about summary refs log tree commit diff
path: root/src/thread/pthread_mutex_trylock.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-08-16 02:41:45 -0400
committerRich Felker <dalias@aerifal.cx>2014-08-16 02:41:45 -0400
commit25d12fc0fc51f1fae0f85b4649a6463eb805aa8f (patch)
tree31307fc1e70d71c67592f5b405d0f01fce894713 /src/thread/pthread_mutex_trylock.c
parentb092f1c5fa9c048e12d002c7b972df5ecbe96d1d (diff)
downloadmusl-25d12fc0fc51f1fae0f85b4649a6463eb805aa8f.tar.gz
musl-25d12fc0fc51f1fae0f85b4649a6463eb805aa8f.tar.xz
musl-25d12fc0fc51f1fae0f85b4649a6463eb805aa8f.zip
optimize locking against vm changes for mmap/munmap
the whole point of this locking is to prevent munmap, or mmap with
MAP_FIXED, from deallocating virtual addresses, or changing the
backing a given virtual address refers to, during certain race windows
involving self-synchronized unmapping or destruction of pthread
synchronization objects. there is no need for exclusion in the other
direction, so it suffices to take the lock momentarily and release it
before making the syscall, rather than holding it across the syscall.
Diffstat (limited to 'src/thread/pthread_mutex_trylock.c')
0 files changed, 0 insertions, 0 deletions