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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -