diff options
author | Rickard Green <[email protected]> | 2011-10-09 01:00:51 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2011-11-13 20:40:57 +0100 |
commit | 9bed74c6b44f691c7c6572ec2c9f57219d8894a6 (patch) | |
tree | 55d10811da3b4e0bb8aa22aeea50112cb846149b /erts/emulator/beam/erl_alloc.c | |
parent | bc5818cfdd56e19a16357f4443d80a56426aa134 (diff) | |
download | otp-9bed74c6b44f691c7c6572ec2c9f57219d8894a6.tar.gz otp-9bed74c6b44f691c7c6572ec2c9f57219d8894a6.tar.bz2 otp-9bed74c6b44f691c7c6572ec2c9f57219d8894a6.zip |
Implement generic lock-free queue
The implementation of an ERTS internal, generic, many to one, lock-free
queue for communication between threads. The many to one scenario is
very common in ERTS, so it can be used in a lot of places in the future.
Changing to this queue from a lock based queue, however, often requires
some redesigning. This since we have often used the lock of the queue
to protect other information too.
Diffstat (limited to 'erts/emulator/beam/erl_alloc.c')
-rw-r--r-- | erts/emulator/beam/erl_alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c index 705ace26fa..cce4b4adf0 100644 --- a/erts/emulator/beam/erl_alloc.c +++ b/erts/emulator/beam/erl_alloc.c @@ -41,6 +41,7 @@ #include "erl_monitors.h" #include "erl_bif_timer.h" #include "erl_cpu_topology.h" +#include "erl_thr_queue.h" #if defined(ERTS_ALC_T_DRV_SEL_D_STATE) || defined(ERTS_ALC_T_DRV_EV_D_STATE) #include "erl_check_io.h" #endif @@ -524,6 +525,10 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop) = sizeof(ErtsDrvSelectDataState); fix_type_sizes[ERTS_ALC_FIX_TYPE_IX(ERTS_ALC_T_MSG_REF)] = sizeof(ErlMessage); +#ifdef ERTS_SMP + fix_type_sizes[ERTS_ALC_FIX_TYPE_IX(ERTS_ALC_T_THR_Q_EL_SL)] + = sizeof(ErtsThrQElement_t); +#endif #ifdef HARD_DEBUG hdbg_init(); #endif |