aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 7dc5aa85e9..499bdd77ba 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1652,10 +1652,14 @@ struct Sint_buf {
};
char* Sint_to_buf(Sint, struct Sint_buf*);
+#define ERTS_IOLIST_OK 0
+#define ERTS_IOLIST_OVERFLOW 1
+#define ERTS_IOLIST_TYPE 2
+
Eterm buf_to_intlist(Eterm**, char*, int, Eterm); /* most callers pass plain char*'s */
int io_list_to_buf(Eterm, char*, int);
int io_list_to_buf2(Eterm, char*, int);
-int io_list_len(Eterm);
+int erts_iolist_size(Eterm, Uint *);
int is_string(Eterm);
void erl_at_exit(void (*) (void*), void*);
Eterm collect_memory(Process *);
@@ -1889,6 +1893,8 @@ erts_alloc_message_heap(Uint size,
# if defined(DEBUG)
# define DeclareTmpHeap(VariableName,Size,Process) \
Eterm *VariableName = erts_debug_allocate_tmp_heap(Size,Process)
+# define DeclareTypedTmpHeap(Type,VariableName,Process) \
+ Type *VariableName = (Type *) erts_debug_allocate_tmp_heap(sizeof(Type)/sizeof(Eterm),Process)
# define DeclareTmpHeapNoproc(VariableName,Size) \
Eterm *VariableName = erts_debug_allocate_tmp_heap(Size,NULL)
# define UseTmpHeap(Size,Proc) \
@@ -1910,6 +1916,8 @@ erts_alloc_message_heap(Uint size,
# else
# define DeclareTmpHeap(VariableName,Size,Process) \
Eterm *VariableName = (ERTS_PROC_GET_SCHDATA(Process)->tmp_heap)+(ERTS_PROC_GET_SCHDATA(Process)->num_tmp_heap_used)
+# define DeclareTypedTmpHeap(Type,VariableName,Process) \
+ Type *VariableName = (Type *) (ERTS_PROC_GET_SCHDATA(Process)->tmp_heap)+(ERTS_PROC_GET_SCHDATA(Process)->num_tmp_heap_used)
# define DeclareTmpHeapNoproc(VariableName,Size) \
Eterm *VariableName = (erts_get_scheduler_data()->tmp_heap)+(erts_get_scheduler_data()->num_tmp_heap_used)
# define UseTmpHeap(Size,Proc) \
@@ -1935,6 +1943,8 @@ erts_alloc_message_heap(Uint size,
#else
# define DeclareTmpHeap(VariableName,Size,Process) \
Eterm VariableName[Size]
+# define DeclareTypedTmpHeap(Type,VariableName,Process) \
+ Type VariableName[1]
# define DeclareTmpHeapNoproc(VariableName,Size) \
Eterm VariableName[Size]
# define UseTmpHeap(Size,Proc) /* Nothing */