| plan 9 kernel history: overview | file list | diff list |
1990/0509/port/sturp.c (diff list | history)
| 1990/0505/sys/src/9/port/sturp.c:166,172 – 1990/0509/sys/src/9/port/sturp.c:166,172 (short | long | prev | next) | ||
| 1990/0227 | Urp *up; up = (Urp *)a; | |
| 1990/0312 |
| |
| 1990/0509 | return (up->state&HUNGUP) || (up->unechoed==up->nxb && up->wq->len==0); | |
| 1990/0227 | } | |
| 1990/0312 | static int isdead(void *a) | |
| 1990/0505/sys/src/9/port/sturp.c:188,212 – 1990/0509/sys/src/9/port/sturp.c:188,223 | ||
| 1990/0227 | /* | |
| 1990/0312 | * wait for all outstanding messages to drain, tell kernel * process we're closing. | |
| 1990/0509 | * * if 2 minutes elapse, give it up | |
| 1990/0227 | */ | |
| 1990/0312 | up->state |= CLOSING; | |
| 1990/0505 |
| |
| 1990/0509 | tsleep(&up->r, isflushed, up, 2*60*1000); | |
| 1990/0312 | /* | |
| 1990/0509 | * kill off the kernel process | |
| 1990/0312 | */ | |
| 1990/0509 | wakeup(&up->rq->r); qlock(&up->xmit); /* * ack all outstanding messages */ | |
| 1990/0312 | i = up->next - 1; if(i < 0) i = 7; rcvack(up, ECHO+i); | |
| 1990/0509 | * free all staged but unsent messages | |
| 1990/0312 | */ | |
| 1990/0509 | for(i = 0; i < 7; i++) if(up->xb[i]){ freeb(up->xb[i]); up->xb[i] = 0; } qunlock(&up->xmit); | |
| 1990/0403 | if(up->kstarted == 0) up->state = 0; | |