Top "Pthreads" questions

Pthreads (POSIX Threads) is a standardised C-based API for creating and manipulating threads.

C , how to create thread using pthread_create function

I'm making a c file for a dispatch queue that gets a task and put it in to a queue …

c multithreading function pthreads createthread
Difference between -pthread and -lpthread while compiling

What is the difference between gcc -pthread and gcc -lpthread which is used while compiling multithreaded programs?

multithreading gcc thread-safety pthreads compiler-flags
Is it possible to determine the thread holding a mutex?

Firstly, I use pthread library to write multithreading C program. Threads always hung by their waited mutexs. When I use …

c linux multithreading pthreads mutex
Check to see if a pthread mutex is locked or unlocked (After a thread has locked itself)

I need to see if a mutex is locked or unlocked in an if statement so I check it like …

c pthreads deadlock mutex
C: How do you declare a recursive mutex with POSIX threads?

I am a bit confused on how to declare a recursive mutex using pthread. What I try to do is …

c multithreading pthreads mutex recursive-mutex
Source code of PThread Library?

I am trying to find the source code of pthread library. (I guess its a supposed to be a part …

linux pthreads open-source
How can I wait for any/all pthreads to complete?

I just want my main thread to wait for any and all my (p)threads to complete before exiting. The …

c linux multithreading pthreads posix-api
What is the Re-entrant lock and concept in general?

I always get confused. Would someone explain what Reentrant means in different contexts? And why would you want to use …

multithreading locking pthreads
How to set the name of a thread in Linux pthreads?

Is there any way of setting the name of a thread in Linux? My main purpose is it would be …

c linux pthreads
When to use pthread condition variables?

pthread question: it appears that a condition variable only works if pthread_cond_wait is called before the other thread …

c linux pthreads