diff options
author | Rickard Green <[email protected]> | 2013-02-21 01:13:58 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-02-21 01:13:58 +0100 |
commit | c53b24bcbcbfa55f6c1b8a1e568b99e9874d0d61 (patch) | |
tree | 9c5e3f7aae529ec37bcc1eb32fc7ef41422bbc88 /erts/emulator/beam/erl_thr_queue.h | |
parent | b708bf2064513e524eec1d5de1a9e76e97a20131 (diff) | |
parent | 9ccc56b450cef0fce8b0ed976e91d3dee13ee3b9 (diff) | |
download | otp-c53b24bcbcbfa55f6c1b8a1e568b99e9874d0d61.tar.gz otp-c53b24bcbcbfa55f6c1b8a1e568b99e9874d0d61.tar.bz2 otp-c53b24bcbcbfa55f6c1b8a1e568b99e9874d0d61.zip |
Merge branch 'rickard/thread-queue-fix/OTP-10854' into rickard/r16b/thread-queue-fix/OTP-10854
Conflicts:
erts/emulator/beam/erl_threads.h
Diffstat (limited to 'erts/emulator/beam/erl_thr_queue.h')
-rw-r--r-- | erts/emulator/beam/erl_thr_queue.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_thr_queue.h b/erts/emulator/beam/erl_thr_queue.h index edcf2c3823..ae8c7fb19a 100644 --- a/erts/emulator/beam/erl_thr_queue.h +++ b/erts/emulator/beam/erl_thr_queue.h @@ -76,13 +76,12 @@ typedef struct { typedef struct ErtsThrQElement_t_ ErtsThrQElement_t; typedef struct ErtsThrQElement_t ErtsThrQPrepEnQ_t; -typedef union { - erts_atomic_t atmc; - ErtsThrQElement_t *ptr; -} ErtsThrQPtr_t; - struct ErtsThrQElement_t_ { - ErtsThrQPtr_t next; +#ifdef USE_THREADS + erts_atomic_t next; +#else + ErtsThrQElement_t *next; +#endif union { erts_atomic_t atmc; void *ptr; @@ -130,7 +129,7 @@ struct ErtsThrQ_t_ { * thread dequeuing. */ struct { - ErtsThrQPtr_t head; + erts_atomic_t head; ErtsThrQLive_t live; ErtsThrQElement_t *first; ErtsThrQElement_t *unref_end; |