Re: pthread_cond_wait() on OpenBSD (MIPS)
- From: "ant again" <jpchen89@xxxxxxxxx>
- Date: 19 Jul 2006 02:28:22 -0700
Thanks Kihlman. Yeah, it works fine on i386, but always hangs on
MIPS(QED-MIPS-5231).
Anyway, after I upgrade pthread's source code to OpenBSD 3.3, it works
fine on MIPS.
Ant
Gabriel Kihlman wrote:
"ant again" <jpchen89@xxxxxxxxx> writes:
Hi, All,
I use the following piece of code to test pthread on OpenBSD 3.2 (MIPS
CPU). But the
pthread_cond_wait(&cond, &mutex) always hangs and never wakes up.
Anyone has such experience?
Upgrade?
$ uname -a
OpenBSD orm.abc.se 3.8 GENERIC#507 i386
$ gcc -pthread -Wall o.c
$ ./a.out
in main(), pthread_mutex_init(&mutex, NULL), err=0
in main(), pthread_mutex_init(&cond, NULL), err=0
in run(), starting run...
in run(), nothing to do, taking a nap...
in play(), sleeping for 3 seconds...
in play(), playing with the value of p=0...
in play(), pthread_cond_signal(), err=0
in play(), sleeping for 3 seconds...
in run(), pthread_cond_wait(), err=0
in run(), getting up...
in run(), p is now 1
in run(), nothing to do, taking a nap...
^C
$
.
- References:
- pthread_cond_wait() on OpenBSD (MIPS)
- From: ant again
- Re: pthread_cond_wait() on OpenBSD (MIPS)
- From: Gabriel Kihlman
- pthread_cond_wait() on OpenBSD (MIPS)
- Prev by Date: Re: pthread_cond_wait() on OpenBSD (MIPS)
- Next by Date: How to block a signal in all threads?
- Previous by thread: Re: pthread_cond_wait() on OpenBSD (MIPS)
- Next by thread: How to block a signal in all threads?
- Index(es):
Relevant Pages
|