diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-26 22:24:31 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-26 22:24:31 +0200 |
commit | cdc2c30e99f2fb3d65dfbc8ef73efd433a3f1966 (patch) | |
tree | 5c3d5a6a42311f09444ca34d09bfebc78e08f5a3 /sys/include | |
parent | b4cdfc6c5517390d6be05b2c01e56bacc9e85ea8 (diff) |
reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)
semaphore locks have much higher overhead than initially presented
in the "Semaphores in Plan9" paper. until the reason for it has been
found out i will revert the changes.
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/ape/lock.h | 3 | ||||
-rw-r--r-- | sys/include/libc.h | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/sys/include/ape/lock.h b/sys/include/ape/lock.h index f2fd9a453..2f36f3b4f 100644 --- a/sys/include/ape/lock.h +++ b/sys/include/ape/lock.h @@ -10,8 +10,7 @@ typedef struct { - long key; - long sem; + int val; } Lock; #ifdef __cplusplus diff --git a/sys/include/libc.h b/sys/include/libc.h index c84acc0f5..a92e5680d 100644 --- a/sys/include/libc.h +++ b/sys/include/libc.h @@ -410,18 +410,11 @@ enum { extern void prof(void (*fn)(void*), void *arg, int entries, int what); /* - * atomic - */ -extern long ainc(long*); -extern long adec(long*); - -/* * synchronization */ typedef struct Lock { - long key; - long sem; + int val; } Lock; extern int _tas(int*); @@ -708,6 +701,9 @@ extern char* sysname(void); extern void werrstr(char*, ...); #pragma varargck argpos werrstr 1 +extern long ainc(long*); +extern long adec(long*); + extern char *argv0; #define ARGBEGIN for((argv0||(argv0=*argv)),argv++,argc--;\ argv[0] && argv[0][0]=='-' && argv[0][1];\ |