aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2009-12-13 19:13:58 +0000
committerErlang/OTP <[email protected]>2009-12-13 19:13:58 +0000
commit0a498068ecdb871211bc1c69d9c020b3bc9310c6 (patch)
treea7bc53395fd33a673f113f8d2e654aaa63c2d83b
parent4c67dcccfc6f03f7e19f934751f8274ed3b9cccc (diff)
downloadotp-0a498068ecdb871211bc1c69d9c020b3bc9310c6.tar.gz
otp-0a498068ecdb871211bc1c69d9c020b3bc9310c6.tar.bz2
otp-0a498068ecdb871211bc1c69d9c020b3bc9310c6.zip
OTP-8341 Minor alignment adjustments of scheduler specific data.
-rw-r--r--erts/emulator/beam/erl_process.c2
-rw-r--r--erts/emulator/beam/erl_process.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 9960172366..a4afe0574f 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -219,7 +219,7 @@ ErtsSchedulerData *erts_scheduler_data;
ErtsAlignedRunQueue *erts_aligned_run_queues;
Uint erts_no_run_queues;
-typedef struct {
+typedef union {
ErtsSchedulerData esd;
char align[ERTS_ALC_CACHE_LINE_ALIGN_SIZE(sizeof(ErtsSchedulerData))];
} ErtsAlignedSchedulerData;
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 7bae1e4efc..7597eb5e31 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -339,9 +339,14 @@ do { \
struct ErtsSchedulerData_ {
#ifdef ERTS_SMP
- ethr_tid tid; /* Thread id */
+ /*
+ * Keep X registers first (so we get as many low
+ * numbered registers as possible in the same cache
+ * line).
+ */
Eterm save_reg[ERTS_X_REGS_ALLOCATED]; /* X registers */
FloatDef freg[MAX_REG]; /* Floating point registers. */
+ ethr_tid tid; /* Thread id */
struct erl_bits_state erl_bits_state; /* erl_bits.c state */
void *match_pseudo_process; /* erl_db_util.c:db_prog_match() */
Process *free_process;