Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the type of pthread_mutex_t?

Tags:

pthreads

From: https://www.sourceware.org/pthreads-win32/manual/pthread_mutex_init.html

Variables of type pthread_mutex_t can also be initialized statically,

So, what is the type of pthread_mutex_t?

like image 612
Aquarius_Girl Avatar asked Nov 30 '22 10:11

Aquarius_Girl


1 Answers

That is the type. The implementation underneath is often a struct and you can look in the header files if you really care about the specific implementation of the library you're using, but those details don't matter for using it, you just care about the pthread_mutex_t type.

pthread_mutex_t mymutex = PTHREAD_MUTEX_INITIALIZER;
like image 181
Carlos Martín Nieto Avatar answered Dec 09 '22 07:12

Carlos Martín Nieto