aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-10-08 10:21:05 +0200
committerRickard Green <[email protected]>2010-10-08 10:21:05 +0200
commit1993157ef34ca5a16c98630b622235da6a2c7384 (patch)
tree69d92610ad7d444947ecce1c496f58d51266eca3 /erts/emulator/beam
parent4d2d294031da9d0073ae44fa29399f01f036e026 (diff)
parent24094014aa9e6a5df6fe9ae56333b99c6e927826 (diff)
downloadotp-1993157ef34ca5a16c98630b622235da6a2c7384.tar.gz
otp-1993157ef34ca5a16c98630b622235da6a2c7384.tar.bz2
otp-1993157ef34ca5a16c98630b622235da6a2c7384.zip
Merge branch 'rickard/halfword-bug' into dev
* rickard/halfword-bug: Fix newly introduced halfword emulator bugs
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_db.c6
-rw-r--r--erts/emulator/beam/erl_process.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 52d5f86ee0..1c2c0fe4cb 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -2754,13 +2754,13 @@ void init_db(void)
(sizeof(erts_meta_main_tab_lock_t)
* (ERTS_META_MAIN_TAB_LOCK_TAB_SIZE+1)));
- if ((((Uint) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) != 0)
+ if ((((UWord) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) != 0)
meta_main_tab_locks = ((erts_meta_main_tab_lock_t *)
- ((((Uint) meta_main_tab_locks)
+ ((((UWord) meta_main_tab_locks)
& ~ERTS_CACHE_LINE_MASK)
+ ERTS_CACHE_LINE_SIZE));
- ASSERT((((Uint) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) == 0);
+ ASSERT((((UWord) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) == 0);
for (i = 0; i < ERTS_META_MAIN_TAB_LOCK_TAB_SIZE; i++) {
erts_smp_rwmtx_init_opt_x(&meta_main_tab_locks[i].rwmtx, &rwmtx_opt,
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 901167a315..b47ce97c46 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -2528,9 +2528,9 @@ erts_init_scheduling(int mrq, int no_schedulers, int no_schedulers_online)
aligned_sched_sleep_info = erts_alloc(ERTS_ALC_T_SCHDLR_SLP_INFO,
(sizeof(ErtsAlignedSchedulerSleepInfo)
*(n+1)));
- if ((((Uint) aligned_sched_sleep_info) & ERTS_CACHE_LINE_MASK) == 0)
+ if ((((UWord) aligned_sched_sleep_info) & ERTS_CACHE_LINE_MASK) == 0)
aligned_sched_sleep_info = ((ErtsAlignedSchedulerSleepInfo *)
- ((((Uint) aligned_sched_sleep_info)
+ ((((UWord) aligned_sched_sleep_info)
& ~ERTS_CACHE_LINE_MASK)
+ ERTS_CACHE_LINE_SIZE));
for (ix = 0; ix < n; ix++) {