-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change static initializer of initial_heap_ptr and spin_dummy to zero
(refactoring) * src/atomic_ops.c (spin_dummy): Define as volatile; initialize to 0 (instead of 1). * src/atomic_ops.c (AO_spin): Change the code to expect spin_dummy variable to be 0 instead of 1; update comment. * src/atomic_ops.c (AO_pause): Reformat code. * src/atomic_ops_malloc.c (initial_heap_ptr): Initialize to 0 (instead of (AO_uintptr_t)AO_initial_heap); add comment. * src/atomic_ops_malloc.c (get_chunk): If initial_ptr variable is 0 then treat its value as (AO_uintptr_t)AO_initial_heap; add assertion that my_chunk_ptr is non-zero when storing it to initial_heap_ptr.
- Loading branch information
Showing
2 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters