changeset 59252 | 623722a6aeb9 |
parent 59249 | 29b0d0b61615 |
59251:4cbfa5077d68 | 59252:623722a6aeb9 |
---|---|
68 if (new_top > end) { |
68 if (new_top > end) { |
69 // Not enough space left |
69 // Not enough space left |
70 return 0; |
70 return 0; |
71 } |
71 } |
72 |
72 |
73 const uintptr_t prev_top = Atomic::cmpxchg(new_top, &_top, top); |
73 const uintptr_t prev_top = Atomic::cmpxchg(&_top, top, new_top); |
74 if (prev_top == top) { |
74 if (prev_top == top) { |
75 // Success |
75 // Success |
76 return top; |
76 return top; |
77 } |
77 } |
78 |
78 |