aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process_lock.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-11-18 12:18:08 +0100
committerRickard Green <[email protected]>2011-11-18 12:18:08 +0100
commitc4bba16b943db225715c0aed1944bb1190ec352a (patch)
treea711068cbce25a9237f81b315867d2d934547aec /erts/emulator/beam/erl_process_lock.c
parent6214fde94809079d1764e4273886544272784eb3 (diff)
downloadotp-c4bba16b943db225715c0aed1944bb1190ec352a.tar.gz
otp-c4bba16b943db225715c0aed1944bb1190ec352a.tar.bz2
otp-c4bba16b943db225715c0aed1944bb1190ec352a.zip
Replace spinlock with mutex as pix_lock implementation
The spinlocks used implementing pix-locks have been replaced with mutexes since they perform better during heavy contention.
Diffstat (limited to 'erts/emulator/beam/erl_process_lock.c')
-rw-r--r--erts/emulator/beam/erl_process_lock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process_lock.c b/erts/emulator/beam/erl_process_lock.c
index 83379d7352..da97523dd0 100644
--- a/erts/emulator/beam/erl_process_lock.c
+++ b/erts/emulator/beam/erl_process_lock.c
@@ -123,10 +123,10 @@ erts_init_proc_lock(int cpus)
erts_smp_spinlock_init(&qs_lock, "proc_lck_qs_alloc");
for (i = 0; i < ERTS_NO_OF_PIX_LOCKS; i++) {
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_smp_spinlock_init_x(&erts_pix_locks[i].u.spnlck,
- "pix_lock", make_small(i));
+ erts_mtx_init_x(&erts_pix_locks[i].u.mtx,
+ "pix_lock", make_small(i));
#else
- erts_smp_spinlock_init(&erts_pix_locks[i].u.spnlck, "pix_lock");
+ erts_mtx_init(&erts_pix_locks[i].u.mtx, "pix_lock");
#endif
}
queue_free_list = NULL;