Userspace handling of errstr and errno (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Sun, 4 Aug 2013 02:48:46 +0000 (19:48 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sun, 4 Aug 2013 02:48:46 +0000 (19:48 -0700)
commit54adb7fd9b73436abc11998ca33a17528db76794
treec04c12784df5135703eab164381f3db6dbdd1e0e
parent9b60893147f935204d3baa4d742eccabcda798d2
Userspace handling of errstr and errno (XCC)

Since not all uthreads have TLS, errno and the new errstr need to be
decoupled from the TLS.

When we're a uthread, we'll use storage in the uthread struct for errno
and errstr.  Otherwise, we'll default to the TLS locations (for vcores).
ld.so will continue to use its own area.  Very early in start.c, before
we call out to uthread code, we'd also use the TLS location.

perror() will print out the errstr, if there is one like so:

"your-message: errno-translated-to-text, errstr"

Rebuild your cross compiler.
tools/compilers/gcc-glibc/glibc-2.14.1-ros/include/errno.h [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/Versions
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/bits/errno.h
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/errno.c
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/perror.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/syscall.c
user/parlib/include/uthread.h
user/parlib/uthread.c