diff options
author | Rickard Green <[email protected]> | 2012-07-25 22:27:26 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-07-31 17:03:32 +0200 |
commit | 6e24f2dcb8095aeed157d66204a2e5bace90863b (patch) | |
tree | a33cc33eedb6dd093500b292259bd638b59b438f /erts/emulator/beam/erl_process_lock.h | |
parent | 146d7cb4821a9c2c864b91c78de2e58f79918c63 (diff) | |
download | otp-6e24f2dcb8095aeed157d66204a2e5bace90863b.tar.gz otp-6e24f2dcb8095aeed157d66204a2e5bace90863b.tar.bz2 otp-6e24f2dcb8095aeed157d66204a2e5bace90863b.zip |
Use static allocation of process lock queues
By using statically allocated lock queues there is no longer
any need for locking corresponding pix lock when process
locks have been transferred after a wait. This costs us 3 words
extra in process structure, but improves performance during
contention.
Diffstat (limited to 'erts/emulator/beam/erl_process_lock.h')
-rw-r--r-- | erts/emulator/beam/erl_process_lock.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process_lock.h b/erts/emulator/beam/erl_process_lock.h index 8dbdaccc68..51282ed872 100644 --- a/erts/emulator/beam/erl_process_lock.h +++ b/erts/emulator/beam/erl_process_lock.h @@ -56,15 +56,13 @@ typedef erts_aint32_t ErtsProcLocks; -typedef struct erts_proc_lock_queues_t_ erts_proc_lock_queues_t; - typedef struct erts_proc_lock_t_ { #if ERTS_PROC_LOCK_ATOMIC_IMPL erts_smp_atomic32_t flags; #else ErtsProcLocks flags; #endif - erts_proc_lock_queues_t *queues; + erts_tse_t *queue[ERTS_PROC_LOCK_MAX_BIT+1]; Sint32 refc; #ifdef ERTS_PROC_LOCK_DEBUG erts_smp_atomic32_t locked[ERTS_PROC_LOCK_MAX_BIT+1]; |