summaryrefslogtreecommitdiff
path: root/runtime/caml/domain_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/caml/domain_state.h')
-rw-r--r--runtime/caml/domain_state.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/caml/domain_state.h b/runtime/caml/domain_state.h
index ee4613d60b..84e677d041 100644
--- a/runtime/caml/domain_state.h
+++ b/runtime/caml/domain_state.h
@@ -22,6 +22,9 @@
#include "misc.h"
#include "mlvalues.h"
+#define NUM_EXTRA_PARAMS 64
+typedef value extra_params_area[NUM_EXTRA_PARAMS];
+
/* This structure sits in the TLS area and is also accessed efficiently
* via native code, which is why the indices are important */
@@ -33,7 +36,6 @@ typedef struct {
#endif
#include "domain_state.tbl"
#undef DOMAIN_STATE
- CAMLalign(8) char end_of_domain_state;
} caml_domain_state;
enum {
@@ -43,11 +45,17 @@ enum {
#undef DOMAIN_STATE
};
+#ifdef CAML_NAME_SPACE
+#define LAST_DOMAIN_STATE_MEMBER extra_params
+#else
+#define LAST_DOMAIN_STATE_MEMBER _extra_params
+#endif
+
/* Check that the structure was laid out without padding,
since the runtime assumes this in computing offsets */
CAML_STATIC_ASSERT(
- offsetof(caml_domain_state, end_of_domain_state) ==
- Domain_state_num_fields * 8);
+ offsetof(caml_domain_state, LAST_DOMAIN_STATE_MEMBER) ==
+ (Domain_state_num_fields - 1) * 8);
CAMLextern caml_domain_state* Caml_state;
#ifdef CAML_NAME_SPACE