This is the mail archive of the
mailing list for the Cygwin project.
RE: sem_trywait returns EAGAIN (rather than returning -1 and setting errno)
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: <cygwin at cygwin dot com>
- Date: Wed, 27 Feb 2002 09:08:54 +1100
- Subject: RE: sem_trywait returns EAGAIN (rather than returning -1 and setting errno)
> -----Original Message-----
> From: Christopher Faylor [mailto:email@example.com]
> On Tue, Feb 26, 2002 at 08:37:35PM +1100, Robert Collins wrote:
> >The problem should _not_ be endemic in the pthreads code, as
> I rewrote
> >nearly all the pthread* functions from the P1003.1 draft spec.
> % grep 'return E' thread.cc
*Sigh*. That just shows that that is what the code is meant to do.
If you check the spec, you'll see that most of the pthread functions are meant to return the error number.
i.e. picking a function at random - pthread_mutex_lock
If successful, the pthread_mutex_lock( ) and pthread_mutex_unlock( ) functions shall return zero;
otherwise, an error number shall be returned to indicate the error.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html