aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-10-01 12:19:50 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-11-17 16:07:55 +0100
commit0d5ee7a4ad7bc41b7cca878990926fb5ba57f6a2 (patch)
treec73e5feeeec9d4ab5825b4d0bb4caecb514100cb /erts/emulator/beam/global.h
parent1391715d8bbba315e1509e60e6245159a009bd9b (diff)
downloadotp-0d5ee7a4ad7bc41b7cca878990926fb5ba57f6a2.tar.gz
otp-0d5ee7a4ad7bc41b7cca878990926fb5ba57f6a2.tar.bz2
otp-0d5ee7a4ad7bc41b7cca878990926fb5ba57f6a2.zip
Do not use GCC extensions in copy
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 */