1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Use C11 atomics instead of atomic_decrement(_val)

Replace atomic_decrement and atomic_decrement_val with
atomic_fetch_add_relaxed.

Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
Wilco Dijkstra
2022-09-09 14:22:26 +01:00
parent 53b251c9ff
commit a364a3a709
15 changed files with 16 additions and 16 deletions

View File

@ -3033,7 +3033,7 @@ munmap_chunk (mchunkptr p)
|| __glibc_unlikely (!powerof2 (mem & (pagesize - 1))))
malloc_printerr ("munmap_chunk(): invalid pointer");
atomic_decrement (&mp_.n_mmaps);
atomic_fetch_add_relaxed (&mp_.n_mmaps, -1);
atomic_fetch_add_relaxed (&mp_.mmapped_mem, -total_size);
/* If munmap failed the process virtual memory address space is in a