sysv_sem.c (3308) | sysv_sem.c (3396) |
---|---|
1/* $Id: sysv_sem.c,v 1.2 1994/09/17 13:24:17 davidg Exp $ */ | 1/* $Id: sysv_sem.c,v 1.3 1994/10/02 17:35:27 phk Exp $ */ |
2 3/* 4 * Implementation of SVID semaphores 5 * 6 * Author: Daniel Boulet 7 * 8 * This software is provided ``AS IS'' without any warranties of any kind. 9 */ --- 43 unchanged lines hidden (view full) --- 53int 54semsys(p, uap, retval) 55 struct proc *p; 56 struct semsys_args *uap; 57 int *retval; 58{ 59 60 while (semlock_holder != NULL && semlock_holder != p) | 2 3/* 4 * Implementation of SVID semaphores 5 * 6 * Author: Daniel Boulet 7 * 8 * This software is provided ``AS IS'' without any warranties of any kind. 9 */ --- 43 unchanged lines hidden (view full) --- 53int 54semsys(p, uap, retval) 55 struct proc *p; 56 struct semsys_args *uap; 57 int *retval; 58{ 59 60 while (semlock_holder != NULL && semlock_holder != p) |
61 sleep((caddr_t)&semlock_holder, (PZERO - 4)); | 61 (void) tsleep((caddr_t)&semlock_holder, (PZERO - 4), "semsys", 0); |
62 63 if (uap->which >= sizeof(semcalls)/sizeof(semcalls[0])) 64 return (EINVAL); 65 return ((*semcalls[uap->which])(p, &uap[1], retval)); 66} 67 68/* 69 * Lock or unlock the entire semaphore facility. --- 774 unchanged lines hidden (view full) --- 844 /* 845 * If somebody else is holding the global semaphore facility lock 846 * then sleep until it is released. 847 */ 848 while (semlock_holder != NULL && semlock_holder != p) { 849#ifdef SEM_DEBUG 850 printf("semaphore facility locked - sleeping ...\n"); 851#endif | 62 63 if (uap->which >= sizeof(semcalls)/sizeof(semcalls[0])) 64 return (EINVAL); 65 return ((*semcalls[uap->which])(p, &uap[1], retval)); 66} 67 68/* 69 * Lock or unlock the entire semaphore facility. --- 774 unchanged lines hidden (view full) --- 844 /* 845 * If somebody else is holding the global semaphore facility lock 846 * then sleep until it is released. 847 */ 848 while (semlock_holder != NULL && semlock_holder != p) { 849#ifdef SEM_DEBUG 850 printf("semaphore facility locked - sleeping ...\n"); 851#endif |
852 sleep((caddr_t)&semlock_holder, (PZERO - 4)); | 852 (void) tsleep((caddr_t)&semlock_holder, (PZERO - 4), "semext", 0); |
853 } 854 855 did_something = 0; 856 857 /* 858 * Go through the chain of undo vectors looking for one 859 * associated with this process. 860 */ --- 80 unchanged lines hidden --- | 853 } 854 855 did_something = 0; 856 857 /* 858 * Go through the chain of undo vectors looking for one 859 * associated with this process. 860 */ --- 80 unchanged lines hidden --- |