| plan 9 kernel history: overview | file list | diff list |
1990/1104/port/chan.c (diff list | history)
| 1990/1009/sys/src/9/port/chan.c:14,32 – 1990/1104/sys/src/9/port/chan.c:14,36 (short | long | prev | next) | ||
| 1990/0227 | int incref(Ref *r) { | |
| 1990/1104 | int x; | |
| 1990/0227 | lock(r); | |
| 1990/1104 | x = ++r->ref; | |
| 1990/0227 | unlock(r); | |
| 1990/1104 | return x; | |
| 1990/0227 | } int decref(Ref *r) { | |
| 1990/1104 | int x; | |
| 1990/0227 | lock(r); | |
| 1990/1104 | x = --r->ref; | |
| 1990/0227 | unlock(r); | |
| 1990/1104 | return x; | |
| 1990/0227 | } void | |