macros.texi 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. @c Define common macros used to keep phrasing consistent in the manual.
  2. @ifclear MACROS
  3. @set MACROS
  4. @c Names used to refer to the library, as noun phrases at the start or
  5. @c not at the start of a sentence.
  6. @macro Theglibc
  7. The GNU C Library
  8. @end macro
  9. @macro theglibc
  10. the GNU C Library
  11. @end macro
  12. @c Name used to refer to the library as an adjective.
  13. @macro glibcadj
  14. GNU C Library
  15. @end macro
  16. @c Description applying to all GNU systems; that is, used in
  17. @c describing a property of a system such that no system without that
  18. @c property would be considered a variant of the GNU system.
  19. @macro gnusystems
  20. GNU systems
  21. @end macro
  22. @c Systems that are not GNU systems.
  23. @macro nongnusystems
  24. non-GNU systems
  25. @end macro
  26. @c Description applying to GNU/Linux and GNU/Hurd systems, but not
  27. @c necessarily to other variants of the GNU system.
  28. @macro gnulinuxhurdsystems
  29. GNU/Linux and GNU/Hurd systems
  30. @end macro
  31. @c Description applying to GNU/Hurd systems; that is, systems using the
  32. @c GNU Hurd with the GNU C Library.
  33. @macro gnuhurdsystems
  34. GNU/Hurd systems
  35. @end macro
  36. @c Description applying to GNU/Linux systems; that is, systems using
  37. @c the Linux kernel with the GNU C Library.
  38. @macro gnulinuxsystems
  39. GNU/Linux systems
  40. @end macro
  41. @c Document the safety functions as preliminary. It does NOT expand its
  42. @c comments.
  43. @macro prelim {comments}
  44. Preliminary:
  45. @end macro
  46. @c Document a function as thread safe.
  47. @macro mtsafe {comments}
  48. | MT-Safe \comments\
  49. @end macro
  50. @c Document a function as thread unsafe.
  51. @macro mtunsafe {comments}
  52. | MT-Unsafe \comments\
  53. @end macro
  54. @c Document a function as safe for use in asynchronous signal handlers.
  55. @macro assafe {comments}
  56. | AS-Safe \comments\
  57. @end macro
  58. @c Document a function as unsafe for use in asynchronous signal
  59. @c handlers. This distinguishes unmarked functions, for which this
  60. @c property has not been assessed, from those that have been analyzed.
  61. @macro asunsafe {comments}
  62. | AS-Unsafe \comments\
  63. @end macro
  64. @c Document a function as safe for use when asynchronous cancellation is
  65. @c enabled.
  66. @macro acsafe {comments}
  67. | AC-Safe \comments\
  68. @end macro
  69. @c Document a function as unsafe for use when asynchronous cancellation
  70. @c is enabled. This distinguishes unmarked functions, for which this
  71. @c property has not been assessed, from those that have been analyzed.
  72. @macro acunsafe {comments}
  73. | AC-Unsafe \comments\
  74. @end macro
  75. @c Format safety properties without referencing the section of the
  76. @c definitions. To be used in the definitions of the properties
  77. @c themselves.
  78. @macro sampsafety {notes}
  79. @noindent
  80. \notes\|
  81. @end macro
  82. @c Format the safety properties of a function.
  83. @macro safety {notes}
  84. \notes\| @xref{POSIX Safety Concepts}.
  85. @end macro
  86. @c Function is MT- and AS-Unsafe due to an internal race.
  87. @macro mtasurace {comments}
  88. race\comments\
  89. @end macro
  90. @c Function is AS-Unsafe due to an internal race.
  91. @macro asurace {comments}
  92. race\comments\
  93. @end macro
  94. @c Function is MT-Safe, but with potential race on user-supplied object
  95. @c of opaque type.
  96. @macro mtsrace {comments}
  97. race\comments\
  98. @end macro
  99. @c Function is MT- and AS-Unsafe for modifying an object that is decreed
  100. @c MT-constant due to MT-Unsafe accesses elsewhere.
  101. @macro mtasuconst {comments}
  102. const\comments\
  103. @end macro
  104. @c Function accesses the assumed-constant locale object.
  105. @macro mtslocale {comments}
  106. locale\comments\
  107. @end macro
  108. @c Function accesses the assumed-constant environment.
  109. @macro mtsenv {comments}
  110. env\comments\
  111. @end macro
  112. @c Function accesses the assumed-constant hostid.
  113. @macro mtshostid {comments}
  114. hostid\comments\
  115. @end macro
  116. @c Function accesses the assumed-constant _sigintr variable.
  117. @macro mtssigintr {comments}
  118. sigintr\comments\
  119. @end macro
  120. @c Function performs MT-Unsafe initialization at the first call.
  121. @macro mtuinit {comments}
  122. init\comments\
  123. @end macro
  124. @c Function performs libc_once AS-Unsafe initialization.
  125. @macro asuinit {comments}
  126. init\comments\
  127. @end macro
  128. @c Function performs libc_once AC-Unsafe initialization.
  129. @macro acuinit {comments}
  130. init\comments\
  131. @end macro
  132. @c Function is AS-Unsafe because it takes a non-recursive mutex that may
  133. @c already be held by the function interrupted by the signal.
  134. @macro asulock {comments}
  135. lock\comments\
  136. @end macro
  137. @c Function is AC-Unsafe because it may fail to release a mutex.
  138. @macro aculock {comments}
  139. lock\comments\
  140. @end macro
  141. @c Function is AS-Unsafe because some data structure may be inconsistent
  142. @c due to an ongoing updated interrupted by a signal.
  143. @macro asucorrupt {comments}
  144. corrupt\comments\
  145. @end macro
  146. @c Function is AC-Unsafe because some data structure may be left
  147. @c inconsistent when cancelled.
  148. @macro acucorrupt {comments}
  149. corrupt\comments\
  150. @end macro
  151. @c Function is AS- and AC-Unsafe because of malloc/free.
  152. @macro ascuheap {comments}
  153. heap\comments\
  154. @end macro
  155. @c Function is AS-Unsafe because of malloc/free.
  156. @macro asuheap {comments}
  157. heap\comments\
  158. @end macro
  159. @c Function is AS- and AC-Unsafe because of dlopen/dlclose.
  160. @macro ascudlopen {comments}
  161. dlopen\comments\
  162. @end macro
  163. @c Function is AS- and AC-Unsafe because of unknown plugins.
  164. @macro ascuplugin {comments}
  165. plugin\comments\
  166. @end macro
  167. @c Function is AS- and AC-Unsafe because of i18n.
  168. @macro ascuintl {comments}
  169. i18n\comments\
  170. @end macro
  171. @c Function is AS--Unsafe because of i18n.
  172. @macro asuintl {comments}
  173. i18n\comments\
  174. @end macro
  175. @c Function may leak file descriptors if async-cancelled.
  176. @macro acsfd {comments}
  177. fd\comments\
  178. @end macro
  179. @c Function may leak memory if async-cancelled.
  180. @macro acsmem {comments}
  181. mem\comments\
  182. @end macro
  183. @c Function is unsafe due to temporary overriding a signal handler.
  184. @macro mtascusig {comments}
  185. sig\comments\
  186. @end macro
  187. @c Function is MT- and AS-Unsafe due to temporarily changing attributes
  188. @c of the controlling terminal.
  189. @macro mtasuterm {comments}
  190. term\comments\
  191. @end macro
  192. @c Function is AC-Unsafe for failing to restore attributes of the
  193. @c controlling terminal.
  194. @macro acuterm {comments}
  195. term\comments\
  196. @end macro
  197. @c Function sets timers atomically.
  198. @macro mtstimer {comments}
  199. timer\comments\
  200. @end macro
  201. @c Function sets and restores timers.
  202. @macro mtascutimer {comments}
  203. timer\comments\
  204. @end macro
  205. @c Function temporarily changes the current working directory.
  206. @macro mtasscwd {comments}
  207. cwd\comments\
  208. @end macro
  209. @c Function may fail to restore to the original current working
  210. @c directory after temporarily changing it.
  211. @macro acscwd {comments}
  212. cwd\comments\
  213. @end macro
  214. @c Function is MT-Safe while POSIX says it needn't be MT-Safe.
  215. @macro mtsposix {comments}
  216. !posix\comments\
  217. @end macro
  218. @c Function is MT-Unsafe while POSIX says it should be MT-Safe.
  219. @macro mtuposix {comments}
  220. !posix\comments\
  221. @end macro
  222. @c Function is AS-Safe while POSIX says it needn't be AS-Safe.
  223. @macro assposix {comments}
  224. !posix\comments\
  225. @end macro
  226. @c Function is AS-Unsafe while POSIX says it should be AS-Safe.
  227. @macro asuposix {comments}
  228. !posix\comments\
  229. @end macro
  230. @c Function is AC-Safe while POSIX says it needn't be AC-Safe.
  231. @macro acsposix {comments}
  232. !posix\comments\
  233. @end macro
  234. @c Function is AC-Unsafe while POSIX says it should be AC-Safe.
  235. @macro acuposix {comments}
  236. !posix\comments\
  237. @end macro
  238. @iftex
  239. @macro twoexp{exp}
  240. @math{2^{{\exp\}}}
  241. @end macro
  242. @end iftex
  243. @ifnottex
  244. @macro twoexp{exp}
  245. 2^\exp\
  246. @end macro
  247. @end ifnottex
  248. @c Used by errlist.awk and errnos.awk to generate other files.
  249. @c Note that error values have ABI implications for the Hurd.
  250. @macro errno {err, val, str}
  251. @cindex \str\
  252. ``\str\.''
  253. @end macro
  254. @c Dummy placeholder while converting annotations.
  255. @c For details on expected use, see `summary.pl --help'.
  256. @macro standards {standard, header}
  257. @end macro
  258. @c To be used for @*x lists of elements.
  259. @macro standardsx {element, standard, header}
  260. @end macro
  261. @end ifclear