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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

