Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141983605
D42032.id128076.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42032.id128076.diff
View Options
diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2
--- a/lib/libc/sys/semctl.2
+++ b/lib/libc/sys/semctl.2
@@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 9, 2020
+.Dd October 2, 2023
.Dt SEMCTL 2
.Os
.Sh NAME
@@ -79,6 +79,15 @@
.Fa "struct semid_ds" ,
storing it in the memory pointed to by
.Fa arg.buf .
+.It Dv SEM_STAT
+Return a
+.Fa "semid_ds"
+structure as for
+.Dv IPC_STAT .
+However, for this command we assume
+.Fa semid
+is an array index in the kernel's internal array that maintains information
+about all semaphore sets on the system rather than an id of a semaphore set.
.It Dv IPC_SET
Changes the
.Fa sem_perm.uid ,
@@ -156,12 +165,19 @@
.Sh RETURN VALUES
On success, when
.Fa cmd
-is one of
+is is one of
.Dv GETVAL , GETPID , GETNCNT
or
.Dv GETZCNT ,
.Fn semctl
-returns the corresponding value; otherwise, 0 is returned.
+returns the corresponding value, when
+.Fa cmd
+is
+.Dv SEM_STAT
+.Fn semctl
+returns the identifier of the semaphore set whose index was given in
+.Fa semid ;
+otherwise, 0 is returned.
On failure, -1 is returned, and
.Va errno
is set to indicate the error.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 12:21 PM (50 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27649946
Default Alt Text
D42032.id128076.diff (1 KB)
Attached To
Mode
D42032: semctl(2): Add SEM_STAT to the list of operations
Attached
Detach File
Event Timeline
Log In to Comment