semantics of pthread locks
From: Scott J. McCaughrin (sjmccaug_at_bluestem.prairienet.org)
Date: 09/29/05
- Previous message: Mozis: "problem in proc_read.."
- Next in thread: Chris Friesen: "Re: semantics of pthread locks"
- Reply: Chris Friesen: "Re: semantics of pthread locks"
- Reply: David Schwartz: "Re: semantics of pthread locks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Sep 2005 21:25:35 +0000 (UTC)
I can accept the need to call pthread_mutex_lock() before dealing with a
condition variable, but why must a shared resource be tested prior to
calling pthread_cond_wait()? Suppose a wait-thread is expected to block
until a shared counter reaches a certain value: why must it test for the
condition first, before the call (assuming the condition is not met)?
- Previous message: Mozis: "problem in proc_read.."
- Next in thread: Chris Friesen: "Re: semantics of pthread locks"
- Reply: Chris Friesen: "Re: semantics of pthread locks"
- Reply: David Schwartz: "Re: semantics of pthread locks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]