Skip to content

Commit

Permalink
Merge branch 'sverk/ethr_aux-cache-align-bug' into maint
Browse files Browse the repository at this point in the history
* sverk/ethr_aux-cache-align-bug:
  erts: Fix cache line alignment bug for ts_event_pool
  • Loading branch information
sverker committed Jun 13, 2014
2 parents 8d08111 + aa3a7c2 commit 179f61e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions erts/lib_src/common/ethr_aux.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 179f61e

Please sign in to comment.