diff options
author | Rickard Green <[email protected]> | 2012-04-27 13:06:27 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-04-27 13:06:27 +0200 |
commit | 398bb9a9a5b2a56f0333ce81efe00380692ec93a (patch) | |
tree | adb7239744ae6f3d45f672e29d9c2bd97e0e67d9 /erts/emulator/beam/erl_db.c | |
parent | 52312a8b93e8b250099e2f1b1b802e63e37971cc (diff) | |
parent | 3730e28ad736f0538141d4474e0038a9cc48df71 (diff) | |
download | otp-398bb9a9a5b2a56f0333ce81efe00380692ec93a.tar.gz otp-398bb9a9a5b2a56f0333ce81efe00380692ec93a.tar.bz2 otp-398bb9a9a5b2a56f0333ce81efe00380692ec93a.zip |
Merge branch 'rickard/proc-sched/OTP-9892'
* rickard/proc-sched/OTP-9892:
Teach etp-commands to understand new emulator internal data structures
Optimize process state changes
Optimize process table access
Implement possibility to use ordinary mutexes as process locks
Conflicts:
erts/emulator/beam/erl_alloc.types
Diffstat (limited to 'erts/emulator/beam/erl_db.c')
-rw-r--r-- | erts/emulator/beam/erl_db.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index 5cbfa65378..5bd8163968 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -2849,7 +2849,7 @@ void init_db(void) else db_max_tabs = user_requested_db_max_tabs; - bits = erts_fit_in_bits(db_max_tabs-1); + bits = erts_fit_in_bits_int32(db_max_tabs-1); if (bits > SMALL_BITS) { erl_exit(1,"Max limit for ets tabled too high %u (max %u).", db_max_tabs, ((Uint)1)<<SMALL_BITS); @@ -3098,7 +3098,7 @@ retry: if (to_proc == NULL) { return 0; /* heir not alive, table still mine */ } - if (erts_cmp_timeval(&to_proc->started, &tb->common.heir_started) != 0) { + if (to_proc->started_interval != tb->common.heir_started_interval) { erts_smp_proc_unlock(to_proc, to_locks); return 0; /* heir dead and pid reused, table still mine */ } @@ -3494,14 +3494,14 @@ static void set_heir(Process* me, DbTable* tb, Eterm heir, UWord heir_data) return; } if (heir == me->id) { - tb->common.heir_started = me->started; + erts_ensure_later_proc_interval(me->started_interval); + tb->common.heir_started_interval = me->started_interval; } else { - Process* heir_proc= erts_pid2proc_opt(me, ERTS_PROC_LOCK_MAIN, heir, - 0, ERTS_P2P_FLG_SMP_INC_REFC); + Process* heir_proc= erts_proc_lookup(heir); if (heir_proc != NULL) { - tb->common.heir_started = heir_proc->started; - erts_smp_proc_dec_refc(heir_proc); + erts_ensure_later_proc_interval(heir_proc->started_interval); + tb->common.heir_started_interval = heir_proc->started_interval; } else { tb->common.heir = am_none; } |