.\" 2005-04-08, mtk, Noted kernel version numbers for semtimedop()
.\" 2007-07-09, mtk, Added an EXAMPLE code segment.
.\"
-.TH SEMOP 2 2013-04-17 "Linux" "Linux Programmer's Manual"
+.TH SEMOP 2 2014-05-10 "Linux" "Linux Programmer's Manual"
.SH NAME
semop, semtimedop \- System V semaphore operations
.SH SYNOPSIS
.B #include <sys/ipc.h>
.B #include <sys/sem.h>
.sp
-.BI "int semop(int " semid ", struct sembuf *" sops ", unsigned " nsops );
+.BI "int semop(int " semid ", struct sembuf *" sops ", size_t " nsops );
.sp
-.BI "int semtimedop(int " semid ", struct sembuf *" sops ", unsigned " nsops ,
-.BI " struct timespec *" timeout );
+.BI "int semtimedop(int " semid ", struct sembuf *" sops ", size_t " nsops ,
+.BI " const struct timespec *" timeout );
.fi
.sp
.in -4n
.BR semtimedop ():
_GNU_SOURCE
.SH DESCRIPTION
-Each semaphore in a System V semaphore set
+Each semaphore in a System\ V semaphore set
has the following associated values:
.sp
.in +4n
(and none of the operations in
.I sops
is performed).
-Otherwise
+Otherwise,
.I semzcnt
(the count of threads waiting until this semaphore's value becomes zero)
is incremented by one and the thread sleeps until
(and none of the operations in
.I sops
is performed).
-Otherwise
+Otherwise,
.I semncnt
(the counter of threads waiting for this semaphore's value to increase)
is incremented by one and the thread sleeps until
behaves exactly like
.BR semop ().
.SH RETURN VALUE
-If successful
+If successful,
.BR semop ()
and
.BR semtimedop ()
for a semaphore can all be retrieved using appropriate
.BR semctl (2)
calls.
-.PP
+.SS Semaphore limits
The following limits on semaphore set resources affect the
.BR semop ()
call:
.BR sem_overview (7),
.BR svipc (7),
.BR time (7)
+.SH COLOPHON
+This page is part of release 3.67 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.