sysv_sem.c (109623) | sysv_sem.c (109829) |
---|---|
1/* $FreeBSD: head/sys/kern/sysv_sem.c 109623 2003-01-21 08:56:16Z alfred $ */ | 1/* $FreeBSD: head/sys/kern/sysv_sem.c 109829 2003-01-25 21:27:37Z alfred $ */ |
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 */ --- 843 unchanged lines hidden (view full) --- 853 mtx_unlock(&Giant); 854 return (error); 855} 856 857#ifndef _SYS_SYSPROTO_H_ 858struct semop_args { 859 int semid; 860 struct sembuf *sops; | 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 */ --- 843 unchanged lines hidden (view full) --- 853 mtx_unlock(&Giant); 854 return (error); 855} 856 857#ifndef _SYS_SYSPROTO_H_ 858struct semop_args { 859 int semid; 860 struct sembuf *sops; |
861 u_int nsops; | 861 size_t nsops; |
862}; 863#endif 864 865/* 866 * MPSAFE 867 */ 868int 869semop(td, uap) 870 struct thread *td; 871 struct semop_args *uap; 872{ 873 int semid = uap->semid; | 862}; 863#endif 864 865/* 866 * MPSAFE 867 */ 868int 869semop(td, uap) 870 struct thread *td; 871 struct semop_args *uap; 872{ 873 int semid = uap->semid; |
874 u_int nsops = uap->nsops; | 874 size_t nsops = uap->nsops; |
875 struct sembuf *sops; 876 struct semid_ds *semaptr; 877 struct sembuf *sopptr = 0; 878 struct sem *semptr = 0; 879 struct sem_undo *suptr; 880 struct mtx *sema_mtxp; | 875 struct sembuf *sops; 876 struct semid_ds *semaptr; 877 struct sembuf *sopptr = 0; 878 struct sem *semptr = 0; 879 struct sem_undo *suptr; 880 struct mtx *sema_mtxp; |
881 int i, j, error; | 881 size_t i, j; 882 int error; |
882 int do_wakeup, do_undos; 883 884 DPRINTF(("call to semop(%d, 0x%x, %u)\n", semid, sops, nsops)); 885 886 if (!jail_sysvipc_allowed && jailed(td->td_ucred)) 887 return (ENOSYS); 888 889 semid = IPCID_TO_IX(semid); /* Convert back to zero origin */ --- 333 unchanged lines hidden --- | 883 int do_wakeup, do_undos; 884 885 DPRINTF(("call to semop(%d, 0x%x, %u)\n", semid, sops, nsops)); 886 887 if (!jail_sysvipc_allowed && jailed(td->td_ucred)) 888 return (ENOSYS); 889 890 semid = IPCID_TO_IX(semid); /* Convert back to zero origin */ --- 333 unchanged lines hidden --- |