Skip to contentSkip to conversation

(non-member) wait-notify mechanism in pthreads

DISCUSSION ronkhu 3 participants 3 messages Apr 28, 2003

lore
Share & tools
lore

ronkhu

author
#0 lore raw

Im not a member of this list but I've got a question:
How does one go about implementing a wait-notify mechanism in pthreads in lieu of the busy-waiting approach( which tends to be a cpu-hog)?

#1 lore raw
Quoted 4 lines · ronkhu

Im not a member of this list but I've got a question:
How does one go about implementing a wait-notify mechanism in pthreads in lieu of the
busy-waiting approach( which tends to be a cpu-hog)?

Mutexes, condition variables, or POSIX semaphores. See the "POSIX Threads" section in the "libc" Info file for more details.

Signature · 1 line
Glynn Clements <[email protected]>
#2 lore raw

If you dont need to execute something while waiting a thread to exit, you can use only pthread API instead mutex, waiting a thread to join.

Luciano

----- Original Message -----
From: "Glynn Clements" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Monday, April 28, 2003 10:57 AM
Subject: Re: (non-member) wait-notify mechanism in pthreads

Quoted 15 lines
Quoted 4 lines · ronkhu

Im not a member of this list but I've got a question:
How does one go about implementing a wait-notify mechanism in pthreads in lieu of the
busy-waiting approach( which tends to be a cpu-hog)?

Mutexes, condition variables, or POSIX semaphores. See the "POSIX Threads" section in the "libc" Info file for more details.

Signature · 3 lines
Glynn Clements <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe

linux-c-programming" in

Quoted 4 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html