diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-03-11 18:57:22 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-03-11 18:57:22 +0100 |
commit | 25f04a68a168a948783618910e115316eb0ed3fc (patch) | |
tree | b3cb88e49ef21b5855569918634937bdbf78b19e /sys/src/ape/lib/ap/plan9/_fdinfo.c | |
parent | 34ec2056041a193a471701dd50e2032dc300fb0e (diff) |
ape: threadsafe errno
store errno on the private process stack so its always per process
and not just per memory space. errno itself becomes a macro
dereferencing int *_errnoloc; which is initialized from main9.s
pointing to the private stack location.
various fixes in programs that just imported errno variable with
"extern int errno;" instead of including <errno.h>.
Diffstat (limited to 'sys/src/ape/lib/ap/plan9/_fdinfo.c')
-rw-r--r-- | sys/src/ape/lib/ap/plan9/_fdinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/ape/lib/ap/plan9/_fdinfo.c b/sys/src/ape/lib/ap/plan9/_fdinfo.c index 0252fb6d1..7a3415c93 100644 --- a/sys/src/ape/lib/ap/plan9/_fdinfo.c +++ b/sys/src/ape/lib/ap/plan9/_fdinfo.c @@ -1,12 +1,12 @@ #define _BSDTIME_EXTENSION #include "lib.h" #include <sys/stat.h> -#include <stdlib.h> #include <unistd.h> +#include <errno.h> +#include <stdlib.h> #include "sys9.h" #include <string.h> -extern int errno; Fdinfo _fdinfo[OPEN_MAX]; /* |