aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_driver.h
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-03-01 15:43:48 +0100
committerBjörn Gustavsson <[email protected]>2010-03-10 14:26:08 +0100
commite2f78fbb4dabb19dd908821febc64acd843ad5b4 (patch)
treebe52ec71f62725a62746cfce0ba422e9820977ba /erts/emulator/beam/erl_driver.h
parent42c8a5ab9bdcf8c139f1c5a558e64d39716a6582 (diff)
downloadotp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.tar.gz
otp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.tar.bz2
otp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.zip
Adopt the new (R13B04) Nif functionality to the halfword codebase
Change erl_int_sizes_config to include HALFWORD_HEAP_EMULATOR, which make it possible for the NIFs to figure out the term size.
Diffstat (limited to 'erts/emulator/beam/erl_driver.h')
-rw-r--r--erts/emulator/beam/erl_driver.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index 316d0ef992..15a4f44a7d 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -48,6 +48,10 @@
# define SIZEOF_LONG_LONG_SAVED__ SIZEOF_LONG_LONG
# undef SIZEOF_LONG_LONG
#endif
+#ifdef HALFWORD_HEAP_EMULATOR
+# define HALFWORD_HEAP_EMULATOR_SAVED__ HALFWORD_HEAP_EMULATOR
+# undef HALFWORD_HEAP_EMULATOR
+#endif
#include "erl_int_sizes_config.h"
#if defined(SIZEOF_CHAR_SAVED__) && SIZEOF_CHAR_SAVED__ != SIZEOF_CHAR
# error SIZEOF_CHAR mismatch
@@ -65,6 +69,11 @@
# error SIZEOF_LONG_LONG mismatch
#endif
+/* This is OK to override by the NIF/driver implementor */
+#if defined(HALFWORD_HEAP_EMULATOR_SAVED__) && !defined(HALFWORD_HEAP_EMULATOR)
+#define HALFWORD_HEAP_EMULATOR HALFWORD_HEAP_EMULATOR_SAVED__
+#endif
+
#include "erl_drv_nif.h"
#include <stdlib.h>