| plan 9 kernel history: overview | file list | diff list |
1990/0601/gnot/lock.c (diff list | history)
| 1990/0601/sys/src/9/gnot/lock.c:4,10 – 1990/0617/sys/src/9/gnot/lock.c:4,10 (short | long | prev | next) | ||
| 1990/03091 | #include "dat.h" #include "fns.h" | |
| 1990/0403 |
| |
| 1990/0617 | #define PCOFF -1 | |
| 1990/0403 | /* * N.B. Ken's compiler generates a TAS instruction for the sequence: | |
| 1990/0601/sys/src/9/gnot/lock.c:25,37 – 1990/0617/sys/src/9/gnot/lock.c:25,37 | ||
| 1990/03091 | */ | |
| 1990/0403 | if(l->key >= 0){ l->key |= 0x80; | |
| 1990/0617 | l->pc = ((ulong*)&l)[PCOFF]; | |
| 1990/03091 | return; } for(i=0; i<10000000; i++) | |
| 1990/0403 | if(l->key >= 0){ l->key |= 0x80; | |
| 1990/0617 | l->pc = ((ulong*)&l)[PCOFF]; | |
| 1990/03091 | return; | |
| 1990/0601 | } | |
| 1990/0403 | l->key = 0; | |
| 1990/0601/sys/src/9/gnot/lock.c:41,51 – 1990/0617/sys/src/9/gnot/lock.c:41,49 | ||
| 1990/03091 | int canlock(Lock *l) { | |
| 1990/0403 |
| |
| 1990/0617 | l->pc = ((ulong*)&l)[PCOFF]; | |
| 1990/03091 | return 1; } return 0; | |