| plan 9 kernel history: overview | file list | diff list |
1994/0323/port/taslock.c (diff list | history)
| 1994/0322/sys/src/9/port/taslock.c:22,36 – 1994/0323/sys/src/9/port/taslock.c:22,42 (short | long | prev | next) | ||
| 1994/0322 | void ilock(Lock *l) { | |
| 1994/0323 | ulong x; x = splhi(); if(tas(&l->key) == 0){ l->sr = x; | |
| 1994/0322 | return; | |
| 1994/0323 | } | |
| 1994/0322 | for(;;){ while(l->key) ; | |
| 1994/0323 | if(tas(&l->key) == 0){ l->sr = x; | |
| 1994/0322 | return; | |
| 1994/0323 | } | |
| 1994/0322 | } } | |