aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src/common/ethr_aux.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-06-13 15:50:42 +0200
committerSverker Eriksson <[email protected]>2014-06-13 15:50:42 +0200
commit179f61eb3377098083c72b3fff793e6c45a68b11 (patch)
tree63e418a2d7d69c391d6d88f21e4b81628e77f729 /erts/lib_src/common/ethr_aux.c
parent8d081115b4d57bb3a52a6ebe87c119cb762bc153 (diff)
parentaa3a7c229ca39400de7d281ae11c4ec78592e095 (diff)
downloadotp-179f61eb3377098083c72b3fff793e6c45a68b11.tar.gz
otp-179f61eb3377098083c72b3fff793e6c45a68b11.tar.bz2
otp-179f61eb3377098083c72b3fff793e6c45a68b11.zip
Merge branch 'sverk/ethr_aux-cache-align-bug' into maint
* sverk/ethr_aux-cache-align-bug: erts: Fix cache line alignment bug for ts_event_pool
Diffstat (limited to 'erts/lib_src/common/ethr_aux.c')
-rw-r--r--erts/lib_src/common/ethr_aux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/lib_src/common/ethr_aux.c b/erts/lib_src/common/ethr_aux.c
index ceecdcef64..b77f2178f2 100644
--- a/erts/lib_src/common/ethr_aux.c
+++ b/erts/lib_src/common/ethr_aux.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2010-2012. All Rights Reserved.
+ * Copyright Ericsson AB 2010-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -360,10 +360,10 @@ static ethr_ts_event *ts_event_pool(int size, ethr_ts_event **endpp)
int i;
ethr_aligned_ts_event *atsev;
atsev = ethr_mem__.std.alloc(sizeof(ethr_aligned_ts_event) * size
- + ETHR_CACHE_LINE_SIZE);
+ + ETHR_CACHE_LINE_SIZE - 1);
if (!atsev)
return NULL;
- if ((((ethr_uint_t) atsev) & ETHR_CACHE_LINE_MASK) == 0)
+ if ((((ethr_uint_t) atsev) & ETHR_CACHE_LINE_MASK) != 0)
atsev = ((ethr_aligned_ts_event *)
((((ethr_uint_t) atsev) & ~ETHR_CACHE_LINE_MASK)
+ ETHR_CACHE_LINE_SIZE));