summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/semctl.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-08-30 23:23:41 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-08-30 23:23:41 +0400
commitd6177bbbd17ddd3f837485f6cb59e24fbc7f82c5 (patch)
tree009c30637db1e59410942e9f447f9e310da859e5 /sysdeps/unix/sysv/linux/semctl.c
parent411498f0cc1bfe8762a4d999ac2761a70c305113 (diff)
parent344e61df0200af758e794b9843ffb37bd89e5259 (diff)
downloadglibc-d6177bbbd17ddd3f837485f6cb59e24fbc7f82c5.tar.gz
Merge branch 'release/2.19/master' of git://sourceware.org/git/glibc
Conflicts: configure.in include/features.h io/ftw.c malloc/arena.c malloc/malloc.c malloc/mtrace.c nptl/allocatestack.c nptl/nptl-init.c nptl/pthread_attr_init.c nptl/pthread_create.c nptl/pthread_detach.c nptl/pthread_getschedparam.c nptl/pthread_setschedparam.c nptl/pthread_setschedprio.c nptl/pthread_timedjoin.c nptl/pthread_tryjoin.c nptl/sysdeps/unix/sysv/linux/fork.h nptl/sysdeps/unix/sysv/linux/register-atfork.c nptl/sysdeps/unix/sysv/linux/unregister-atfork.c nptl/sysdeps/x86_64/tls.h nscd/Makefile sysdeps/unix/inet/syscalls.list sysdeps/unix/opendir.c sysdeps/x86_64/multiarch/strcasestr-nonascii.c
Diffstat (limited to 'sysdeps/unix/sysv/linux/semctl.c')
-rw-r--r--sysdeps/unix/sysv/linux/semctl.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index 2d28cf661e..b20fb39c30 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995,1997,1998,2000,2003,2004,2006
- Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -34,10 +33,10 @@ struct __old_semid_ds
struct __old_ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
- struct sem *__unbounded __sembase; /* ptr to first semaphore in array */
- struct sem_queue *__unbounded __sem_pending; /* pending operations */
- struct sem_queue *__unbounded __sem_pending_last; /* last pending operation */
- struct sem_undo *__unbounded __undo; /* ondo requests on this array */
+ struct sem *__sembase; /* ptr to first semaphore in array */
+ struct sem_queue *__sem_pending; /* pending operations */
+ struct sem_queue *__sem_pending_last; /* last pending operation */
+ struct sem_undo *__undo; /* ondo requests on this array */
unsigned short int sem_nsems; /* number of semaphores in set */
};
@@ -51,9 +50,6 @@ union semun
struct __old_semid_ds *__old_buf;
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
@@ -92,7 +88,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
#endif
@@ -127,7 +123,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
#if __ASSUME_IPC64 > 0
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
#else
switch (cmd)
{
@@ -137,7 +133,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
break;
default:
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
{
@@ -148,7 +144,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new semctl. */
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
if (result != -1 || errno != EINVAL)
return result;
@@ -168,7 +164,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
}
}
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
if (result != -1 && cmd != IPC_SET)
{
memset(buf, 0, sizeof(*buf));