Skip to content

Commit

Permalink
Use extern instead of caml/threads.h
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Jul 18, 2022
1 parent fc510e5 commit c26fb7b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src-c/native/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@
return Val_unit; \
}
#else
#include <caml/threads.h>
/* XXX(dinosaure): even if they are not defined (only defined by
* [caml/threads.h]), they exists without [threads.cmxa]. For compatibility
* reason, we keep a protection when we compile for Solo5/ocaml-freestanding
* but for the rest, these functions should be available in any cases.
*
* In some cases (Solo5 or Esperanto), [caml/threads.h] is not available but
* these functions still exist!
*/

extern void caml_enter_blocking_section (void);
extern void caml_leave_blocking_section (void);

#define __define_ba_update(name) \
CAMLprim value \
Expand Down

0 comments on commit c26fb7b

Please # to comment.