···472472 into a match in typetexp.
473473 (Samuel Vivien, review by Gabriel Scherer)
474474475475+- #13224: Clarify barriers and spin macros with delayed expansion.
476476+ (Antonin Décimo, review by David Allsopp and Gabriel Scherer)
477477+475478### Build system:
476479477480- #13705: Cache test results of custom Autoconf tests from aclocal.m4.
+14-10
runtime/caml/domain.h
···243243 Note: this expands to an [if] and [for] header, do not exit the body using
244244 jumps or returns, and do not put an [else] immediately after.
245245 */
246246-#define Caml_global_barrier_if_final(num_participating) \
246246+#define Caml_global_barrier_if_final_(/* symbols */ alone, b, go, \
247247+ /* params */ num_participating) \
247248 /* fast path when alone */ \
248248- int CAML_GENSYM(alone) = (num_participating) == 1; \
249249- barrier_status CAML_GENSYM(b) = 0; \
250250- if (CAML_GENSYM(alone) || \
251251- (CAML_GENSYM(b) \
252252- = caml_global_barrier_and_check_final(num_participating))) \
253253- for (int CAML_GENSYM(continue) = 1; CAML_GENSYM(continue); \
249249+ bool alone = (num_participating) == 1; \
250250+ barrier_status b = 0; \
251251+ if (alone || \
252252+ (b = caml_global_barrier_and_check_final(num_participating))) \
253253+ for (bool go = true; go; \
254254 /* release the barrier after the body has executed once */ \
255255- ((CAML_GENSYM(alone) ? (void)0 : \
256256- caml_global_barrier_release_as_final(CAML_GENSYM(b))), \
257257- CAML_GENSYM(continue) = 0))
255255+ (alone ? (void)0 : \
256256+ caml_global_barrier_release_as_final(b)), \
257257+ go = false)
258258+259259+#define Caml_global_barrier_if_final(num_participating) \
260260+ Caml_global_barrier_if_final_(CAML_GENSYM(alone), CAML_GENSYM(b), \
261261+ CAML_GENSYM(go), (num_participating))
258262259263/*
260264 * Termination helpers.
+4-4
runtime/caml/misc.h
···781781# endif
782782#endif
783783784784-/* Generate a named symbol that is unique within the current macro expansion */
785785-#define CAML_GENSYM_3(name, l) caml__##name##_##l
786786-#define CAML_GENSYM_2(name, l) CAML_GENSYM_3(name, l)
787787-#define CAML_GENSYM(name) CAML_GENSYM_2(name, __LINE__)
784784+/* Generate a named symbol that is unique */
785785+#define CAML_GENSYM__(name, id) caml__##name##_##id
786786+#define CAML_GENSYM_(name, id) CAML_GENSYM__(name, id)
787787+#define CAML_GENSYM(name) CAML_GENSYM_(name, __COUNTER__)
788788789789#define MSEC_PER_SEC UINT64_C(1000)
790790#define USEC_PER_MSEC UINT64_C(1000)