uipc_sem.c (164033) | uipc_sem.c (164184) |
---|---|
1/*- 2 * Copyright (c) 2002 Alfred Perlstein <alfred@FreeBSD.org> 3 * Copyright (c) 2003-2005 SPARTA, Inc. 4 * Copyright (c) 2005 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * This software was developed for the FreeBSD Project in part by Network 8 * Associates Laboratories, the Security Research Division of Network --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Alfred Perlstein <alfred@FreeBSD.org> 3 * Copyright (c) 2003-2005 SPARTA, Inc. 4 * Copyright (c) 2005 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * This software was developed for the FreeBSD Project in part by Network 8 * Associates Laboratories, the Security Research Division of Network --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/kern/uipc_sem.c 164033 2006-11-06 13:42:10Z rwatson $"); | 35__FBSDID("$FreeBSD: head/sys/kern/uipc_sem.c 164184 2006-11-11 16:26:58Z trhodes $"); |
36 37#include "opt_mac.h" 38#include "opt_posix.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/sysproto.h> 43#include <sys/eventhandler.h> 44#include <sys/kernel.h> | 36 37#include "opt_mac.h" 38#include "opt_posix.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/sysproto.h> 43#include <sys/eventhandler.h> 44#include <sys/kernel.h> |
45#include <sys/ksem.h> |
|
45#include <sys/priv.h> 46#include <sys/proc.h> | 46#include <sys/priv.h> 47#include <sys/proc.h> |
48#include <sys/posix4.h> |
|
47#include <sys/lock.h> 48#include <sys/mutex.h> 49#include <sys/module.h> 50#include <sys/condvar.h> 51#include <sys/sem.h> 52#include <sys/uio.h> | 49#include <sys/lock.h> 50#include <sys/mutex.h> 51#include <sys/module.h> 52#include <sys/condvar.h> 53#include <sys/sem.h> 54#include <sys/uio.h> |
55#include <sys/semaphore.h> |
|
53#include <sys/syscall.h> 54#include <sys/stat.h> 55#include <sys/sysent.h> 56#include <sys/sysctl.h> 57#include <sys/time.h> 58#include <sys/malloc.h> 59#include <sys/fcntl.h> | 56#include <sys/syscall.h> 57#include <sys/stat.h> 58#include <sys/sysent.h> 59#include <sys/sysctl.h> 60#include <sys/time.h> 61#include <sys/malloc.h> 62#include <sys/fcntl.h> |
63#include <sys/_semaphore.h> |
|
60 | 64 |
61#include <posix4/ksem.h> 62#include <posix4/posix4.h> 63#include <posix4/semaphore.h> 64#include <posix4/_semaphore.h> 65 | |
66#include <security/mac/mac_framework.h> 67 68static int sem_count_proc(struct proc *p); 69static struct ksem *sem_lookup_byname(const char *name); 70static int sem_create(struct thread *td, const char *name, 71 struct ksem **ksret, mode_t mode, unsigned int value); 72static void sem_free(struct ksem *ksnew); 73static int sem_perm(struct thread *td, struct ksem *ks); --- 939 unchanged lines hidden --- | 65#include <security/mac/mac_framework.h> 66 67static int sem_count_proc(struct proc *p); 68static struct ksem *sem_lookup_byname(const char *name); 69static int sem_create(struct thread *td, const char *name, 70 struct ksem **ksret, mode_t mode, unsigned int value); 71static void sem_free(struct ksem *ksnew); 72static int sem_perm(struct thread *td, struct ksem *ks); --- 939 unchanged lines hidden --- |