aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process_lock.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-12-11 08:21:42 +0100
committerRickard Green <[email protected]>2010-12-16 12:38:54 +0100
commitdc122c3a919a2b2fb3ff1f02591ff1872de1c996 (patch)
tree687eedb4b5fcbd7ed822038e49ec0b88485e72c6 /erts/emulator/beam/erl_process_lock.c
parent59eb7be1022a1841aa1153258e80d59794f077a6 (diff)
downloadotp-dc122c3a919a2b2fb3ff1f02591ff1872de1c996.tar.gz
otp-dc122c3a919a2b2fb3ff1f02591ff1872de1c996.tar.bz2
otp-dc122c3a919a2b2fb3ff1f02591ff1872de1c996.zip
Use 32-bit atomics for process lock flags
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 1a220b172a..2e7bc73622 100644
--- a/erts/emulator/beam/erl_process_lock.c
+++ b/erts/emulator/beam/erl_process_lock.c
@@ -124,7 +124,7 @@ erts_init_proc_lock(int cpus)
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));
+ "pix_lock", make_small(i));
#else
erts_smp_spinlock_init(&erts_pix_locks[i].u.spnlck, "pix_lock");
#endif
@@ -955,7 +955,7 @@ erts_proc_lock_init(Process *p)
{
/* We always start with all locks locked */
#if ERTS_PROC_LOCK_ATOMIC_IMPL
- erts_smp_atomic_init(&p->lock.flags, (erts_aint_t) ERTS_PROC_LOCKS_ALL);
+ erts_smp_atomic32_init(&p->lock.flags, (erts_aint32_t) ERTS_PROC_LOCKS_ALL);
#else
p->lock.flags = ERTS_PROC_LOCKS_ALL;
#endif
@@ -974,7 +974,7 @@ erts_proc_lock_init(Process *p)
{
int i;
for (i = 0; i <= ERTS_PROC_LOCK_MAX_BIT; i++)
- erts_smp_atomic_init(&p->lock.locked[i], (erts_aint_t) 1);
+ erts_smp_atomic32_init(&p->lock.locked[i], (erts_aint32_t) 1);
}
#endif
}