sysv_sem.c (72786) | sysv_sem.c (77461) |
---|---|
1/* $FreeBSD: head/sys/kern/sysv_sem.c 72786 2001-02-21 06:39:57Z rwatson $ */ | 1/* $FreeBSD: head/sys/kern/sysv_sem.c 77461 2001-05-30 03:28:59Z dd $ */ |
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 */ --- 13 unchanged lines hidden (view full) --- 23#include <sys/jail.h> 24 25static MALLOC_DEFINE(M_SEM, "sem", "SVID compatible semaphores"); 26 27static void seminit __P((void)); 28static int sysvsem_modload __P((struct module *, int, void *)); 29static int semunload __P((void)); 30static void semexit_myhook __P((struct proc *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 */ --- 13 unchanged lines hidden (view full) --- 23#include <sys/jail.h> 24 25static MALLOC_DEFINE(M_SEM, "sem", "SVID compatible semaphores"); 26 27static void seminit __P((void)); 28static int sysvsem_modload __P((struct module *, int, void *)); 29static int semunload __P((void)); 30static void semexit_myhook __P((struct proc *p)); |
31static int sysctl_sema __P((SYSCTL_HANDLER_ARGS)); |
|
31 32#ifndef _SYS_SYSPROTO_H_ 33struct __semctl_args; 34int __semctl __P((struct proc *p, struct __semctl_args *uap)); 35struct semget_args; 36int semget __P((struct proc *p, struct semget_args *uap)); 37struct semop_args; 38int semop __P((struct proc *p, struct semop_args *uap)); --- 104 unchanged lines hidden (view full) --- 143SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RD, &seminfo.semmns, 0, ""); 144SYSCTL_INT(_kern_ipc, OID_AUTO, semmnu, CTLFLAG_RD, &seminfo.semmnu, 0, ""); 145SYSCTL_INT(_kern_ipc, OID_AUTO, semmsl, CTLFLAG_RW, &seminfo.semmsl, 0, ""); 146SYSCTL_INT(_kern_ipc, OID_AUTO, semopm, CTLFLAG_RD, &seminfo.semopm, 0, ""); 147SYSCTL_INT(_kern_ipc, OID_AUTO, semume, CTLFLAG_RD, &seminfo.semume, 0, ""); 148SYSCTL_INT(_kern_ipc, OID_AUTO, semusz, CTLFLAG_RD, &seminfo.semusz, 0, ""); 149SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, CTLFLAG_RW, &seminfo.semvmx, 0, ""); 150SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, ""); | 32 33#ifndef _SYS_SYSPROTO_H_ 34struct __semctl_args; 35int __semctl __P((struct proc *p, struct __semctl_args *uap)); 36struct semget_args; 37int semget __P((struct proc *p, struct semget_args *uap)); 38struct semop_args; 39int semop __P((struct proc *p, struct semop_args *uap)); --- 104 unchanged lines hidden (view full) --- 144SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RD, &seminfo.semmns, 0, ""); 145SYSCTL_INT(_kern_ipc, OID_AUTO, semmnu, CTLFLAG_RD, &seminfo.semmnu, 0, ""); 146SYSCTL_INT(_kern_ipc, OID_AUTO, semmsl, CTLFLAG_RW, &seminfo.semmsl, 0, ""); 147SYSCTL_INT(_kern_ipc, OID_AUTO, semopm, CTLFLAG_RD, &seminfo.semopm, 0, ""); 148SYSCTL_INT(_kern_ipc, OID_AUTO, semume, CTLFLAG_RD, &seminfo.semume, 0, ""); 149SYSCTL_INT(_kern_ipc, OID_AUTO, semusz, CTLFLAG_RD, &seminfo.semusz, 0, ""); 150SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, CTLFLAG_RW, &seminfo.semvmx, 0, ""); 151SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, ""); |
152SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, 153 NULL, 0, sysctl_sema, "", ""); |
|
151 152#if 0 153RO seminfo.semmap /* SEMMAP unused */ 154RO seminfo.semmni 155RO seminfo.semmns 156RO seminfo.semmnu /* undo entries per system */ 157RW seminfo.semmsl 158RO seminfo.semopm /* SEMOPM unused */ --- 902 unchanged lines hidden (view full) --- 1061 * Deallocate the undo vector. 1062 */ 1063#ifdef SEM_DEBUG 1064 printf("removing vector\n"); 1065#endif 1066 suptr->un_proc = NULL; 1067 *supptr = suptr->un_next; 1068} | 154 155#if 0 156RO seminfo.semmap /* SEMMAP unused */ 157RO seminfo.semmni 158RO seminfo.semmns 159RO seminfo.semmnu /* undo entries per system */ 160RW seminfo.semmsl 161RO seminfo.semopm /* SEMOPM unused */ --- 902 unchanged lines hidden (view full) --- 1064 * Deallocate the undo vector. 1065 */ 1066#ifdef SEM_DEBUG 1067 printf("removing vector\n"); 1068#endif 1069 suptr->un_proc = NULL; 1070 *supptr = suptr->un_next; 1071} |
1072 1073static int 1074sysctl_sema(SYSCTL_HANDLER_ARGS) 1075{ 1076 1077 return (SYSCTL_OUT(req, sema, 1078 sizeof(struct semid_ds) * seminfo.semmni)); 1079} |
|