c - Where are mutex locks defined in GCC? -
i looking @ arena.c
file in gcc, can see at:
http://code.woboq.org/userspace/glibc/malloc/arena.c.html#96
and more specifically:
#define arena_lock(ptr, size) { if (ptr) (void) mutex_lock (&ptr->mutex); else ptr = arena_get2 (ptr, (size), null); } while (0)
i find out mutex_lock()
exactly. can find it's implementation?
edit: found unsure if matches requirements?
http://lxr.free-electrons.com/source/include/linux/mutex.h
edit2 above link doesn't contain mutex_lock()
implementation.
see page.
http://code.woboq.org/userspace/glibc/sysdeps/nptl/malloc-machine.h.html
it has mutex_lock() defination.
another link in question has kernel space implemntation.
you should download whole glibc
source code , using ctags
should browse code.
Comments
Post a Comment