Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pthreads]

The tag has no usage guidance.

-3
votes
1answer
54 views

Explain how a process can be both single threaded and multithreaded [closed]

Explain how a process can be both single threaded and multithreaded
2
votes
3answers
229 views

C Thread Architecture

I'm trying my hand at multi-thread C programming and decided to start with a simple ncurses program to move a character across the terminal screen and change direction based on user input (think ...
0
votes
2answers
268 views

pattern to unlock thread and get variable in fast unlock

I have a thread that goes in a loop doing something like this void thread() { pthread_mutex_lock(mutex); for ( ; ; ) { /** code **/ { pthread_mutex_unlock(mutex); /** ...
1
vote
4answers
1k views

Best algorithm to multi-thread this application?

I define an algorithm to be best if it minimizes the total run time over commodity hardware (e.g. normal desktop and server PCs). I have sets A and B. I also have function f that works like f(a, b, n)...
0
votes
0answers
447 views

using pthread_cond_broadcast with no mutex or waiting thread?

Assuming some pthread_cond_t condvar; properly initialized with pthread_cond_init am I allowed to pthread_cond_broadcast it without any mutex locked and thread blocked with pthread_cond_timedwait on ...