-
pthread_mutex_t
Hi
Could someone tell to explain what is thing does in linux?
or where i can get some info on this?
Thanks
-
& the hat of GPL slaying
-
Banned
Well...looking up the documentation for such a well documented OS would be a good place to start typically. But since that requires too much effort for you it requires too much for me as well. So instead I'll just guess. I believe it is a handle to thread_mutex object. I assume that it is used for multithreading an application and/or used for running a multithreaded environment. It would run like a mutex (it waits for a turn to process). In the future try looking it up on google.
-
Master5001, FYI pthreads are the premier thread
library used in C programming and on most platforms.
Anyway clive,
pthread_mutex_t is used to declare an object of type mutex.
thus: pthread_mutex_t mymutexvariable;
You would then use the mutex variable to lock and unlock a mutex.
eg:
pthread_mutex_lock(&mymutexvariable);
/* critical section */
pthread_mutex_unlock(&mymutexvariable);
see here for more info...
clive, if you have any further questions regarding pthreads there
is a thread already started regarding posix threads.
Hope that helps.
Popular pages
Recent additions