diff options
author | Rickard Green <[email protected]> | 2010-12-15 00:56:56 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-12-16 12:12:25 +0100 |
commit | 8b18824e2b13e60fb1a067f80dbb228172f6a3d2 (patch) | |
tree | 1a1a5bd6f105eeee03cf38a35d2b9a24c7f20ba8 /erts/emulator/beam/erl_process.h | |
parent | 766c7cabb1545418bf59e8dcfcc1a5fae8b01d40 (diff) | |
download | otp-8b18824e2b13e60fb1a067f80dbb228172f6a3d2.tar.gz otp-8b18824e2b13e60fb1a067f80dbb228172f6a3d2.tar.bz2 otp-8b18824e2b13e60fb1a067f80dbb228172f6a3d2.zip |
Safe deallocation of ETS-table structures
Ensure that all threads potentially accessing an ETS-table have dropped
all references to the table before deallocating it.
Diffstat (limited to 'erts/emulator/beam/erl_process.h')
-rw-r--r-- | erts/emulator/beam/erl_process.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h index c038e57b65..0215993035 100644 --- a/erts/emulator/beam/erl_process.h +++ b/erts/emulator/beam/erl_process.h @@ -236,16 +236,14 @@ typedef enum { | ERTS_SSI_FLG_WAITING \ | ERTS_SSI_FLG_SUSPENDED) - -#if !defined(ERTS_SCHED_NEED_BLOCKABLE_AUX_WORK) \ - && defined(ERTS_SMP_SCHEDULERS_NEED_TO_CHECK_CHILDREN) #define ERTS_SCHED_NEED_BLOCKABLE_AUX_WORK -#endif #define ERTS_SSI_AUX_WORK_CHECK_CHILDREN (((long) 1) << 0) +#define ERTS_SSI_AUX_WORK_MISC (((long) 1) << 1) #define ERTS_SSI_BLOCKABLE_AUX_WORK_MASK \ - (ERTS_SSI_AUX_WORK_CHECK_CHILDREN) + (ERTS_SSI_AUX_WORK_CHECK_CHILDREN \ + | ERTS_SSI_AUX_WORK_MISC) #define ERTS_SSI_NONBLOCKABLE_AUX_WORK_MASK \ (0) @@ -1034,6 +1032,7 @@ int erts_sched_set_wakeup_limit(char *str); #ifdef DEBUG void erts_dbg_multi_scheduling_return_trap(Process *, Eterm); #endif +int erts_get_max_no_executing_schedulers(void); #ifdef ERTS_SMP ErtsSchedSuspendResult erts_schedulers_state(Uint *, Uint *, Uint *, int); @@ -1048,6 +1047,11 @@ int erts_is_multi_scheduling_blocked(void); Eterm erts_multi_scheduling_blockers(Process *); void erts_start_schedulers(void); void erts_smp_notify_check_children_needed(void); +void +erts_smp_schedule_misc_aux_work(int ignore_self, + int max_sched, + void (*func)(void *), + void *arg); #endif void erts_sched_notify_check_cpu_bind(void); Uint erts_active_schedulers(void); |