semaphore.c.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. /*[clinic input]
  2. preserve
  3. [clinic start generated code]*/
  4. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  5. # include "pycore_gc.h" // PyGC_Head
  6. # include "pycore_runtime.h" // _Py_ID()
  7. #endif
  8. #if defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS)
  9. PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__,
  10. "acquire($self, /, block=True, timeout=None)\n"
  11. "--\n"
  12. "\n"
  13. "Acquire the semaphore/lock.");
  14. #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \
  15. {"acquire", _PyCFunction_CAST(_multiprocessing_SemLock_acquire), METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__},
  16. static PyObject *
  17. _multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking,
  18. PyObject *timeout_obj);
  19. static PyObject *
  20. _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  21. {
  22. PyObject *return_value = NULL;
  23. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  24. #define NUM_KEYWORDS 2
  25. static struct {
  26. PyGC_Head _this_is_not_used;
  27. PyObject_VAR_HEAD
  28. PyObject *ob_item[NUM_KEYWORDS];
  29. } _kwtuple = {
  30. .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
  31. .ob_item = { &_Py_ID(block), &_Py_ID(timeout), },
  32. };
  33. #undef NUM_KEYWORDS
  34. #define KWTUPLE (&_kwtuple.ob_base.ob_base)
  35. #else // !Py_BUILD_CORE
  36. # define KWTUPLE NULL
  37. #endif // !Py_BUILD_CORE
  38. static const char * const _keywords[] = {"block", "timeout", NULL};
  39. static _PyArg_Parser _parser = {
  40. .keywords = _keywords,
  41. .fname = "acquire",
  42. .kwtuple = KWTUPLE,
  43. };
  44. #undef KWTUPLE
  45. PyObject *argsbuf[2];
  46. Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
  47. int blocking = 1;
  48. PyObject *timeout_obj = Py_None;
  49. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf);
  50. if (!args) {
  51. goto exit;
  52. }
  53. if (!noptargs) {
  54. goto skip_optional_pos;
  55. }
  56. if (args[0]) {
  57. blocking = PyObject_IsTrue(args[0]);
  58. if (blocking < 0) {
  59. goto exit;
  60. }
  61. if (!--noptargs) {
  62. goto skip_optional_pos;
  63. }
  64. }
  65. timeout_obj = args[1];
  66. skip_optional_pos:
  67. return_value = _multiprocessing_SemLock_acquire_impl(self, blocking, timeout_obj);
  68. exit:
  69. return return_value;
  70. }
  71. #endif /* defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS) */
  72. #if defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS)
  73. PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__,
  74. "release($self, /)\n"
  75. "--\n"
  76. "\n"
  77. "Release the semaphore/lock.");
  78. #define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF \
  79. {"release", (PyCFunction)_multiprocessing_SemLock_release, METH_NOARGS, _multiprocessing_SemLock_release__doc__},
  80. static PyObject *
  81. _multiprocessing_SemLock_release_impl(SemLockObject *self);
  82. static PyObject *
  83. _multiprocessing_SemLock_release(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  84. {
  85. return _multiprocessing_SemLock_release_impl(self);
  86. }
  87. #endif /* defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS) */
  88. #if defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS)
  89. PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__,
  90. "acquire($self, /, block=True, timeout=None)\n"
  91. "--\n"
  92. "\n"
  93. "Acquire the semaphore/lock.");
  94. #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \
  95. {"acquire", _PyCFunction_CAST(_multiprocessing_SemLock_acquire), METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__},
  96. static PyObject *
  97. _multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking,
  98. PyObject *timeout_obj);
  99. static PyObject *
  100. _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  101. {
  102. PyObject *return_value = NULL;
  103. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  104. #define NUM_KEYWORDS 2
  105. static struct {
  106. PyGC_Head _this_is_not_used;
  107. PyObject_VAR_HEAD
  108. PyObject *ob_item[NUM_KEYWORDS];
  109. } _kwtuple = {
  110. .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
  111. .ob_item = { &_Py_ID(block), &_Py_ID(timeout), },
  112. };
  113. #undef NUM_KEYWORDS
  114. #define KWTUPLE (&_kwtuple.ob_base.ob_base)
  115. #else // !Py_BUILD_CORE
  116. # define KWTUPLE NULL
  117. #endif // !Py_BUILD_CORE
  118. static const char * const _keywords[] = {"block", "timeout", NULL};
  119. static _PyArg_Parser _parser = {
  120. .keywords = _keywords,
  121. .fname = "acquire",
  122. .kwtuple = KWTUPLE,
  123. };
  124. #undef KWTUPLE
  125. PyObject *argsbuf[2];
  126. Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
  127. int blocking = 1;
  128. PyObject *timeout_obj = Py_None;
  129. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf);
  130. if (!args) {
  131. goto exit;
  132. }
  133. if (!noptargs) {
  134. goto skip_optional_pos;
  135. }
  136. if (args[0]) {
  137. blocking = PyObject_IsTrue(args[0]);
  138. if (blocking < 0) {
  139. goto exit;
  140. }
  141. if (!--noptargs) {
  142. goto skip_optional_pos;
  143. }
  144. }
  145. timeout_obj = args[1];
  146. skip_optional_pos:
  147. return_value = _multiprocessing_SemLock_acquire_impl(self, blocking, timeout_obj);
  148. exit:
  149. return return_value;
  150. }
  151. #endif /* defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS) */
  152. #if defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS)
  153. PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__,
  154. "release($self, /)\n"
  155. "--\n"
  156. "\n"
  157. "Release the semaphore/lock.");
  158. #define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF \
  159. {"release", (PyCFunction)_multiprocessing_SemLock_release, METH_NOARGS, _multiprocessing_SemLock_release__doc__},
  160. static PyObject *
  161. _multiprocessing_SemLock_release_impl(SemLockObject *self);
  162. static PyObject *
  163. _multiprocessing_SemLock_release(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  164. {
  165. return _multiprocessing_SemLock_release_impl(self);
  166. }
  167. #endif /* defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS) */
  168. #if defined(HAVE_MP_SEMAPHORE)
  169. static PyObject *
  170. _multiprocessing_SemLock_impl(PyTypeObject *type, int kind, int value,
  171. int maxvalue, const char *name, int unlink);
  172. static PyObject *
  173. _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs)
  174. {
  175. PyObject *return_value = NULL;
  176. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  177. #define NUM_KEYWORDS 5
  178. static struct {
  179. PyGC_Head _this_is_not_used;
  180. PyObject_VAR_HEAD
  181. PyObject *ob_item[NUM_KEYWORDS];
  182. } _kwtuple = {
  183. .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
  184. .ob_item = { &_Py_ID(kind), &_Py_ID(value), &_Py_ID(maxvalue), &_Py_ID(name), &_Py_ID(unlink), },
  185. };
  186. #undef NUM_KEYWORDS
  187. #define KWTUPLE (&_kwtuple.ob_base.ob_base)
  188. #else // !Py_BUILD_CORE
  189. # define KWTUPLE NULL
  190. #endif // !Py_BUILD_CORE
  191. static const char * const _keywords[] = {"kind", "value", "maxvalue", "name", "unlink", NULL};
  192. static _PyArg_Parser _parser = {
  193. .keywords = _keywords,
  194. .fname = "SemLock",
  195. .kwtuple = KWTUPLE,
  196. };
  197. #undef KWTUPLE
  198. PyObject *argsbuf[5];
  199. PyObject * const *fastargs;
  200. Py_ssize_t nargs = PyTuple_GET_SIZE(args);
  201. int kind;
  202. int value;
  203. int maxvalue;
  204. const char *name;
  205. int unlink;
  206. fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, argsbuf);
  207. if (!fastargs) {
  208. goto exit;
  209. }
  210. kind = _PyLong_AsInt(fastargs[0]);
  211. if (kind == -1 && PyErr_Occurred()) {
  212. goto exit;
  213. }
  214. value = _PyLong_AsInt(fastargs[1]);
  215. if (value == -1 && PyErr_Occurred()) {
  216. goto exit;
  217. }
  218. maxvalue = _PyLong_AsInt(fastargs[2]);
  219. if (maxvalue == -1 && PyErr_Occurred()) {
  220. goto exit;
  221. }
  222. if (!PyUnicode_Check(fastargs[3])) {
  223. _PyArg_BadArgument("SemLock", "argument 'name'", "str", fastargs[3]);
  224. goto exit;
  225. }
  226. Py_ssize_t name_length;
  227. name = PyUnicode_AsUTF8AndSize(fastargs[3], &name_length);
  228. if (name == NULL) {
  229. goto exit;
  230. }
  231. if (strlen(name) != (size_t)name_length) {
  232. PyErr_SetString(PyExc_ValueError, "embedded null character");
  233. goto exit;
  234. }
  235. unlink = PyObject_IsTrue(fastargs[4]);
  236. if (unlink < 0) {
  237. goto exit;
  238. }
  239. return_value = _multiprocessing_SemLock_impl(type, kind, value, maxvalue, name, unlink);
  240. exit:
  241. return return_value;
  242. }
  243. #endif /* defined(HAVE_MP_SEMAPHORE) */
  244. #if defined(HAVE_MP_SEMAPHORE)
  245. PyDoc_STRVAR(_multiprocessing_SemLock__rebuild__doc__,
  246. "_rebuild($type, handle, kind, maxvalue, name, /)\n"
  247. "--\n"
  248. "\n");
  249. #define _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF \
  250. {"_rebuild", _PyCFunction_CAST(_multiprocessing_SemLock__rebuild), METH_FASTCALL|METH_CLASS, _multiprocessing_SemLock__rebuild__doc__},
  251. static PyObject *
  252. _multiprocessing_SemLock__rebuild_impl(PyTypeObject *type, SEM_HANDLE handle,
  253. int kind, int maxvalue,
  254. const char *name);
  255. static PyObject *
  256. _multiprocessing_SemLock__rebuild(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs)
  257. {
  258. PyObject *return_value = NULL;
  259. SEM_HANDLE handle;
  260. int kind;
  261. int maxvalue;
  262. const char *name;
  263. if (!_PyArg_ParseStack(args, nargs, ""F_SEM_HANDLE"iiz:_rebuild",
  264. &handle, &kind, &maxvalue, &name)) {
  265. goto exit;
  266. }
  267. return_value = _multiprocessing_SemLock__rebuild_impl(type, handle, kind, maxvalue, name);
  268. exit:
  269. return return_value;
  270. }
  271. #endif /* defined(HAVE_MP_SEMAPHORE) */
  272. #if defined(HAVE_MP_SEMAPHORE)
  273. PyDoc_STRVAR(_multiprocessing_SemLock__count__doc__,
  274. "_count($self, /)\n"
  275. "--\n"
  276. "\n"
  277. "Num of `acquire()`s minus num of `release()`s for this process.");
  278. #define _MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF \
  279. {"_count", (PyCFunction)_multiprocessing_SemLock__count, METH_NOARGS, _multiprocessing_SemLock__count__doc__},
  280. static PyObject *
  281. _multiprocessing_SemLock__count_impl(SemLockObject *self);
  282. static PyObject *
  283. _multiprocessing_SemLock__count(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  284. {
  285. return _multiprocessing_SemLock__count_impl(self);
  286. }
  287. #endif /* defined(HAVE_MP_SEMAPHORE) */
  288. #if defined(HAVE_MP_SEMAPHORE)
  289. PyDoc_STRVAR(_multiprocessing_SemLock__is_mine__doc__,
  290. "_is_mine($self, /)\n"
  291. "--\n"
  292. "\n"
  293. "Whether the lock is owned by this thread.");
  294. #define _MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF \
  295. {"_is_mine", (PyCFunction)_multiprocessing_SemLock__is_mine, METH_NOARGS, _multiprocessing_SemLock__is_mine__doc__},
  296. static PyObject *
  297. _multiprocessing_SemLock__is_mine_impl(SemLockObject *self);
  298. static PyObject *
  299. _multiprocessing_SemLock__is_mine(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  300. {
  301. return _multiprocessing_SemLock__is_mine_impl(self);
  302. }
  303. #endif /* defined(HAVE_MP_SEMAPHORE) */
  304. #if defined(HAVE_MP_SEMAPHORE)
  305. PyDoc_STRVAR(_multiprocessing_SemLock__get_value__doc__,
  306. "_get_value($self, /)\n"
  307. "--\n"
  308. "\n"
  309. "Get the value of the semaphore.");
  310. #define _MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF \
  311. {"_get_value", (PyCFunction)_multiprocessing_SemLock__get_value, METH_NOARGS, _multiprocessing_SemLock__get_value__doc__},
  312. static PyObject *
  313. _multiprocessing_SemLock__get_value_impl(SemLockObject *self);
  314. static PyObject *
  315. _multiprocessing_SemLock__get_value(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  316. {
  317. return _multiprocessing_SemLock__get_value_impl(self);
  318. }
  319. #endif /* defined(HAVE_MP_SEMAPHORE) */
  320. #if defined(HAVE_MP_SEMAPHORE)
  321. PyDoc_STRVAR(_multiprocessing_SemLock__is_zero__doc__,
  322. "_is_zero($self, /)\n"
  323. "--\n"
  324. "\n"
  325. "Return whether semaphore has value zero.");
  326. #define _MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF \
  327. {"_is_zero", (PyCFunction)_multiprocessing_SemLock__is_zero, METH_NOARGS, _multiprocessing_SemLock__is_zero__doc__},
  328. static PyObject *
  329. _multiprocessing_SemLock__is_zero_impl(SemLockObject *self);
  330. static PyObject *
  331. _multiprocessing_SemLock__is_zero(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  332. {
  333. return _multiprocessing_SemLock__is_zero_impl(self);
  334. }
  335. #endif /* defined(HAVE_MP_SEMAPHORE) */
  336. #if defined(HAVE_MP_SEMAPHORE)
  337. PyDoc_STRVAR(_multiprocessing_SemLock__after_fork__doc__,
  338. "_after_fork($self, /)\n"
  339. "--\n"
  340. "\n"
  341. "Rezero the net acquisition count after fork().");
  342. #define _MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF \
  343. {"_after_fork", (PyCFunction)_multiprocessing_SemLock__after_fork, METH_NOARGS, _multiprocessing_SemLock__after_fork__doc__},
  344. static PyObject *
  345. _multiprocessing_SemLock__after_fork_impl(SemLockObject *self);
  346. static PyObject *
  347. _multiprocessing_SemLock__after_fork(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  348. {
  349. return _multiprocessing_SemLock__after_fork_impl(self);
  350. }
  351. #endif /* defined(HAVE_MP_SEMAPHORE) */
  352. #if defined(HAVE_MP_SEMAPHORE)
  353. PyDoc_STRVAR(_multiprocessing_SemLock___enter____doc__,
  354. "__enter__($self, /)\n"
  355. "--\n"
  356. "\n"
  357. "Enter the semaphore/lock.");
  358. #define _MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF \
  359. {"__enter__", (PyCFunction)_multiprocessing_SemLock___enter__, METH_NOARGS, _multiprocessing_SemLock___enter____doc__},
  360. static PyObject *
  361. _multiprocessing_SemLock___enter___impl(SemLockObject *self);
  362. static PyObject *
  363. _multiprocessing_SemLock___enter__(SemLockObject *self, PyObject *Py_UNUSED(ignored))
  364. {
  365. return _multiprocessing_SemLock___enter___impl(self);
  366. }
  367. #endif /* defined(HAVE_MP_SEMAPHORE) */
  368. #if defined(HAVE_MP_SEMAPHORE)
  369. PyDoc_STRVAR(_multiprocessing_SemLock___exit____doc__,
  370. "__exit__($self, exc_type=None, exc_value=None, exc_tb=None, /)\n"
  371. "--\n"
  372. "\n"
  373. "Exit the semaphore/lock.");
  374. #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF \
  375. {"__exit__", _PyCFunction_CAST(_multiprocessing_SemLock___exit__), METH_FASTCALL, _multiprocessing_SemLock___exit____doc__},
  376. static PyObject *
  377. _multiprocessing_SemLock___exit___impl(SemLockObject *self,
  378. PyObject *exc_type,
  379. PyObject *exc_value, PyObject *exc_tb);
  380. static PyObject *
  381. _multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs)
  382. {
  383. PyObject *return_value = NULL;
  384. PyObject *exc_type = Py_None;
  385. PyObject *exc_value = Py_None;
  386. PyObject *exc_tb = Py_None;
  387. if (!_PyArg_CheckPositional("__exit__", nargs, 0, 3)) {
  388. goto exit;
  389. }
  390. if (nargs < 1) {
  391. goto skip_optional;
  392. }
  393. exc_type = args[0];
  394. if (nargs < 2) {
  395. goto skip_optional;
  396. }
  397. exc_value = args[1];
  398. if (nargs < 3) {
  399. goto skip_optional;
  400. }
  401. exc_tb = args[2];
  402. skip_optional:
  403. return_value = _multiprocessing_SemLock___exit___impl(self, exc_type, exc_value, exc_tb);
  404. exit:
  405. return return_value;
  406. }
  407. #endif /* defined(HAVE_MP_SEMAPHORE) */
  408. #ifndef _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF
  409. #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF
  410. #endif /* !defined(_MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF) */
  411. #ifndef _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF
  412. #define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF
  413. #endif /* !defined(_MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF) */
  414. #ifndef _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF
  415. #define _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF
  416. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF) */
  417. #ifndef _MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF
  418. #define _MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF
  419. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF) */
  420. #ifndef _MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF
  421. #define _MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF
  422. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF) */
  423. #ifndef _MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF
  424. #define _MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF
  425. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF) */
  426. #ifndef _MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF
  427. #define _MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF
  428. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF) */
  429. #ifndef _MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF
  430. #define _MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF
  431. #endif /* !defined(_MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF) */
  432. #ifndef _MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF
  433. #define _MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF
  434. #endif /* !defined(_MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF) */
  435. #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF
  436. #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF
  437. #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */
  438. /*[clinic end generated code: output=dae57a702cc01512 input=a9049054013a1b77]*/