aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-02-15 15:12:18 +0100
committerSverker Eriksson <[email protected]>2012-02-21 15:32:07 +0100
commitdc2b0ecba50cbe6b2f2321b1f24579a0353ced18 (patch)
tree0ad297a07792533c1d2820c5ca69a886f3239e03 /erts/emulator/beam/erl_process.h
parentc4a8cc5914157c70ced742d957ec0e8d9c618164 (diff)
downloadotp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.tar.gz
otp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.tar.bz2
otp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.zip
erts: Activate staged code in a thread safe way
Activation of staged code is scheduled for a later moment when all schedulers have done a full memory barrier. This allow them to read active code index while executing without any memory barriers at all.
Diffstat (limited to 'erts/emulator/beam/erl_process.h')
-rw-r--r--erts/emulator/beam/erl_process.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index c23810f15a..3f19d92fcd 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -264,6 +264,7 @@ typedef enum {
#define ERTS_SSI_AUX_WORK_CHECK_CHILDREN (((erts_aint32_t) 1) << 8)
#define ERTS_SSI_AUX_WORK_SET_TMO (((erts_aint32_t) 1) << 9)
#define ERTS_SSI_AUX_WORK_MSEG_CACHE_CHECK (((erts_aint32_t) 1) << 10)
+#define ERTS_SSI_AUX_WORK_CODE_IX_ACTIVATION (((erts_aint32_t) 1) << 11)
typedef struct ErtsSchedulerSleepInfo_ ErtsSchedulerSleepInfo;
@@ -429,6 +430,12 @@ typedef struct {
void *queue;
} async_ready;
#endif
+#ifdef ERTS_SMP
+ struct {
+ Process* code_stager;
+ ErtsThrPrgrVal thr_prgr;
+ } code_ix_activation;
+#endif
} ErtsAuxWorkData;
struct ErtsSchedulerData_ {
@@ -1110,6 +1117,9 @@ void erts_smp_notify_check_children_needed(void);
#if ERTS_USE_ASYNC_READY_Q
void erts_notify_check_async_ready_queue(void *);
#endif
+#ifdef ERTS_SMP
+void erts_notify_code_ix_activation(Process* p, ErtsThrPrgrVal later);
+#endif
void erts_schedule_misc_aux_work(int sched_id,
void (*func)(void *),
void *arg);