diff options
author | ivmai <ivmai> | 2011-06-01 12:34:42 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-25 16:03:26 +0400 |
commit | 6fe8d9f16793264f1c3c5e510e7c98204e6cf113 (patch) | |
tree | 61d4354d5490a7685a52044dba34bb0245adb8c8 /src | |
parent | 8551ec0088047d2af2351bfb35511cd9ce8579f5 (diff) | |
download | libatomic_ops-6fe8d9f16793264f1c3c5e510e7c98204e6cf113.tar.gz |
2011-06-01 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops_malloc.c (AO_malloc_enable_mmap): Workaround for
Sun C compiler (call "release" variant of AO_store).
Diffstat (limited to 'src')
-rw-r--r-- | src/atomic_ops_malloc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/atomic_ops_malloc.c b/src/atomic_ops_malloc.c index 3af585e..c2401f3 100644 --- a/src/atomic_ops_malloc.c +++ b/src/atomic_ops_malloc.c @@ -94,7 +94,12 @@ static volatile AO_t mmap_enabled = 0; void AO_malloc_enable_mmap(void) { - AO_store(&mmap_enabled, 1); +# if defined(__sun) + AO_store_release(&mmap_enabled, 1); + /* Workaround for Sun CC */ +# else + AO_store(&mmap_enabled, 1); +# endif } static char *get_mmaped(size_t sz) |