Re: strange behaviour with pthread_cond_wait()
From: Daniel Eischen (deischen_at_freebsd.org)
Date: 08/31/05
- Previous message: Giorgos Keramidas: "Re: strange behaviour with pthread_cond_wait()"
- In reply to: Daniel Valencia: "strange behaviour with pthread_cond_wait()"
- Next in thread: Daniel Valencia: "Re: strange behaviour with pthread_cond_wait()"
- Reply: Daniel Valencia: "Re: strange behaviour with pthread_cond_wait()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Aug 2005 20:48:18 -0400 (EDT) To: Daniel Valencia <fetrovsky@yahoo.com>
On Tue, 30 Aug 2005, Daniel Valencia wrote:
> Hello, everybody...
>
> I have this multithreaded program, and there are these
> two threads that work together with a queue. The
> backend receive thread reads packets and pushes them
> into the queue, while the frontend thread pops them
> off the queue to hand them to the caller. This is an
> implementation of a software switch.
>
> The issue is, i have this little piece of code in the
> thread which actually performs the popping:
[ ... ]
> And when I runn my program, it will immediately exit.
> The message is:
>
> pthread_cond_wait: Unknown error: 0
>
> Not only that: the returned value (e) is 1, while
> EINVAL is 22. According to the man pages, if
1 is EPERM.
And from the POSIX Spec (see
http://www.opengroup.org/onlinepubs/009695399/toc.htm):
[EPERM]
The mutex was not owned by the current thread at
the time of the call.
I suggest Butenhof's "Programming with POSIX Threads" book.
-- DE _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Giorgos Keramidas: "Re: strange behaviour with pthread_cond_wait()"
- In reply to: Daniel Valencia: "strange behaviour with pthread_cond_wait()"
- Next in thread: Daniel Valencia: "Re: strange behaviour with pthread_cond_wait()"
- Reply: Daniel Valencia: "Re: strange behaviour with pthread_cond_wait()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|