1/*- 2 * Implementation of SVID semaphores 3 * 4 * Author: Daniel Boulet 5 * 6 * This software is provided ``AS IS'' without any warranties of any kind. 7 */ 8/*- --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/kern/sysv_sem.c 298069 2016-04-15 16:10:11Z pfg $"); |
41 42#include "opt_compat.h" 43#include "opt_sysvipc.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/sysproto.h> 48#include <sys/eventhandler.h> --- 926 unchanged lines hidden (view full) --- 975sys_semop(struct thread *td, struct semop_args *uap) 976{ 977#define SMALL_SOPS 8 978 struct sembuf small_sops[SMALL_SOPS]; 979 int semid = uap->semid; 980 size_t nsops = uap->nsops; 981 struct sembuf *sops; 982 struct semid_kernel *semakptr; |
983 struct sembuf *sopptr = NULL; 984 struct sem *semptr = NULL; |
985 struct sem_undo *suptr; 986 struct mtx *sema_mtxp; 987 size_t i, j, k; 988 int error; 989 int do_wakeup, do_undos; 990 unsigned short seq; 991 992#ifdef SEM_DEBUG --- 669 unchanged lines hidden --- |