diff options
author | Rickard Green <[email protected]> | 2010-08-10 13:42:42 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-08-10 13:42:42 +0200 |
commit | 59ee2a593090e7d53c97ceba63cbd300d1b9657e (patch) | |
tree | b60c1078eebb64955bba181cfc118ee2f3b845d4 /erts/emulator/beam/register.c | |
parent | 0d553b45b5c3ae8287340887f271bc70f1f1370c (diff) | |
parent | 300b419486c1ca88e33938f182d5d5a8b90fb73f (diff) | |
download | otp-59ee2a593090e7d53c97ceba63cbd300d1b9657e.tar.gz otp-59ee2a593090e7d53c97ceba63cbd300d1b9657e.tar.bz2 otp-59ee2a593090e7d53c97ceba63cbd300d1b9657e.zip |
Merge branch 'rickard/ethread-rewrite/OTP-8544' into dev
* rickard/ethread-rewrite/OTP-8544:
Rewrite ethread library
Diffstat (limited to 'erts/emulator/beam/register.c')
-rw-r--r-- | erts/emulator/beam/register.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/register.c b/erts/emulator/beam/register.c index 900ebcbbf7..c9bb7bbe91 100644 --- a/erts/emulator/beam/register.c +++ b/erts/emulator/beam/register.c @@ -39,8 +39,6 @@ static Hash process_reg; static erts_smp_rwmtx_t regtab_rwmtx; -#define reg_lock_init() erts_smp_rwmtx_init(®tab_rwmtx, \ - "reg_tab") #define reg_try_read_lock() erts_smp_rwmtx_tryrlock(®tab_rwmtx) #define reg_try_write_lock() erts_smp_rwmtx_tryrwlock(®tab_rwmtx) #define reg_read_lock() erts_smp_rwmtx_rlock(®tab_rwmtx) @@ -147,8 +145,11 @@ static void reg_free(RegProc *obj) void init_register_table(void) { HashFunctions f; + erts_smp_rwmtx_opt_t rwmtx_opt = ERTS_SMP_THR_OPTS_DEFAULT_INITER; + rwmtx_opt.type = ERTS_SMP_RWMTX_TYPE_FREQUENT_READ; + rwmtx_opt.lived = ERTS_SMP_RWMTX_LONG_LIVED; - reg_lock_init(); + erts_smp_rwmtx_init_opt(®tab_rwmtx, &rwmtx_opt, "reg_tab"); f.hash = (H_FUN) reg_hash; f.cmp = (HCMP_FUN) reg_cmp; |