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.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 71d072fa7e..e9f7901a51 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -873,7 +873,7 @@ typedef struct {
int possibly_empty;
Eterm* end;
ErtsAlcType_t alloc_type;
-}ErtsEQueue;
+} ErtsEQueue;
#define DEF_EQUEUE_SIZE (16)
@@ -918,15 +918,20 @@ do { \
#define EQUEUE_ISEMPTY(q) (q.back == q.front && q.possibly_empty)
-#define EQUEUE_GET(q) ({ \
- UWord x; \
- q.possibly_empty = 1; \
- x = *(q.front); \
- if (++(q.front) == q.end) { \
- q.front = q.start; \
- } \
- x; \
-})
+ERTS_GLB_INLINE Eterm erts_equeue_get(ErtsEQueue *q);
+
+#if ERTS_GLB_INLINE_INCL_FUNC_DEF
+ERTS_GLB_INLINE Eterm erts_equeue_get(ErtsEQueue *q) {
+ Eterm x;
+ q->possibly_empty = 1;
+ x = *(q->front);
+ if (++(q->front) == q->end) {
+ q->front = q->start;
+ }
+ return x;
+}
+#endif
+#define EQUEUE_GET(q) erts_equeue_get(&(q));
/* binary.c */