Manual Pages for Linux CentOS command on man sem_post
MyWebUniversity

Manual Pages for Linux CentOS command on man sem_post

SEMPOST(3) Linux Programmer's Manual SEMPOST(3)

NAME

sempost - unlock a semaphore SYNOPSIS

#include int sempost(semt *sem);

Link with -pthread. DESCRIPTION sempost() increments (unlocks) the semaphore pointed to by sem. If the semaphore's value consequently becomes greater than zero, then another process or thread blocked in a semwait(3) call will be woken up and proceed to lock the semaphore. RETURN VALUE sempost() returns 0 on success; on error, the value of the semaphore

is left unchanged, -1 is returned, and errno is set to indicate the error. ERRORS EINVAL sem is not a valid semaphore. EOVERFLOW The maximum allowable value for a semaphore would be exceeded. ATTRIBUTES For an explanation of the terms used in this section, see attributes(7). ┌───────────┬───────────────┬─────────┐ │Interface │ Attribute │ Value │ ├───────────┼───────────────┼─────────┤

│sempost() │ Thread safety │ MT-Safe │ └───────────┴───────────────┴─────────┘ CONFORMING TO

POSIX.1-2001. NOTES

sempost() is async-signal-safe: it may be safely called within a sig‐ nal handler. EXAMPLE See semwait(3). SEE ALSO semgetvalue(3), semwait(3), semoverview(7) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2012-05-13 SEMPOST(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™