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.
This commit is contained in:
parent
b4cdfc6c55
commit
cdc2c30e99
39 changed files with 521 additions and 611 deletions
|
@ -10,8 +10,7 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
long key;
|
||||
long sem;
|
||||
int val;
|
||||
} Lock;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -409,19 +409,12 @@ enum {
|
|||
}; /* what */
|
||||
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];\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue