logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

semaphore.h.0p (2893B)


  1. '\" et
  2. .TH semaphore.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. semaphore.h
  12. \(em semaphores
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <semaphore.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <semaphore.h>
  21. header shall define the
  22. .BR sem_t
  23. type, used in performing semaphore operations. The semaphore may be
  24. implemented using a file descriptor, in which case applications are
  25. able to open up at least a total of
  26. {OPEN_MAX}
  27. files and semaphores.
  28. .P
  29. The
  30. .IR <semaphore.h>
  31. header shall define the symbolic constant SEM_FAILED which shall
  32. have type
  33. .BR "sem_t *" .
  34. .P
  35. The following shall be declared as functions and may also be defined
  36. as macros. Function prototypes shall be provided.
  37. .sp
  38. .RS 4
  39. .nf
  40. int sem_close(sem_t *);
  41. int sem_destroy(sem_t *);
  42. int sem_getvalue(sem_t *restrict, int *restrict);
  43. int sem_init(sem_t *, int, unsigned);
  44. sem_t *sem_open(const char *, int, ...);
  45. int sem_post(sem_t *);
  46. int sem_timedwait(sem_t *restrict, const struct timespec *restrict);
  47. int sem_trywait(sem_t *);
  48. int sem_unlink(const char *);
  49. int sem_wait(sem_t *);
  50. .fi
  51. .P
  52. .RE
  53. .P
  54. Inclusion of the
  55. .IR <semaphore.h>
  56. header may make visible symbols defined in the
  57. .IR <fcntl.h>
  58. and
  59. .IR <time.h>
  60. headers.
  61. .LP
  62. .IR "The following sections are informative."
  63. .SH "APPLICATION USAGE"
  64. None.
  65. .SH RATIONALE
  66. None.
  67. .SH "FUTURE DIRECTIONS"
  68. None.
  69. .SH "SEE ALSO"
  70. .IR "\fB<fcntl.h>\fP",
  71. .IR "\fB<sys_types.h>\fP",
  72. .IR "\fB<time.h>\fP"
  73. .P
  74. The System Interfaces volume of POSIX.1\(hy2017,
  75. .IR "\fIsem_close\fR\^(\|)",
  76. .IR "\fIsem_destroy\fR\^(\|)",
  77. .IR "\fIsem_getvalue\fR\^(\|)",
  78. .IR "\fIsem_init\fR\^(\|)",
  79. .IR "\fIsem_open\fR\^(\|)",
  80. .IR "\fIsem_post\fR\^(\|)",
  81. .IR "\fIsem_timedwait\fR\^(\|)",
  82. .IR "\fIsem_trywait\fR\^(\|)",
  83. .IR "\fIsem_unlink\fR\^(\|)"
  84. .\"
  85. .SH COPYRIGHT
  86. Portions of this text are reprinted and reproduced in electronic form
  87. from IEEE Std 1003.1-2017, Standard for Information Technology
  88. -- Portable Operating System Interface (POSIX), The Open Group Base
  89. Specifications Issue 7, 2018 Edition,
  90. Copyright (C) 2018 by the Institute of
  91. Electrical and Electronics Engineers, Inc and The Open Group.
  92. In the event of any discrepancy between this version and the original IEEE and
  93. The Open Group Standard, the original IEEE and The Open Group Standard
  94. is the referee document. The original Standard can be obtained online at
  95. http://www.opengroup.org/unix/online.html .
  96. .PP
  97. Any typographical or formatting errors that appear
  98. in this page are most likely
  99. to have been introduced during the conversion of the source files to
  100. man page format. To report such errors, see
  101. https://www.kernel.org/doc/man-pages/reporting_bugs.html .