semutot--;
semundo_clear(int semid, int semnum){	struct sem_undo *suptr, *suprev, *tmp;	struct undo *sunptr;	int i;	for (suptr = semu_list; suptr != NULL; ) {		sunptr = &suptr->un_ent[0];		for (i = 0; i < suptr->un_cnt; i++, sunptr++) {			if (sunptr->un_id == semid) {				if (semnum == -1 || sunptr->un_num == semnum) {					suptr->un_cnt--;					if (i < suptr->un_cnt) {						suptr->un_ent[i] =						  suptr->un_ent[suptr->un_cnt];						i--, sunptr--;					}				}				if (semnum != -1)					break;			}		}		if (suptr->un_cnt == 0) {			tmp = suptr;			if (suptr == semu_list)				suptr = semu_list = suptr->un_next;			else				suptr = suprev->un_next = suptr->un_next;			pool_put(&semu_pool, tmp);		} else {			suprev = suptr;			suptr = suptr->un_next;		}	}}