Re: pthread_cond_wait() on OpenBSD (MIPS)



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
$

.



Relevant Pages

  • Re: Playing tone through speakers
    ... > would play a continuous tone of a specified frequency through the ... source code including the bits of my libraries it needs: ... It allows you to record your speech, ... back and forth and change things, insert new recorded speech, etc., play ...
    (Debian-User)
  • Re: Anybody code recreationally?
    ... people who play the Magic the Gathering card game. ... and that anyone could view the source code. ... All you can do is ignore him, after all most of this fun coding is for ...
    (microsoft.public.dotnet.languages.vb)
  • Re: [slrn][pan] Moving Along
    ... been written (at least, Slrn does), so it might not work without some ... tweaks to the newsreader's source code. ... (I'm tempted to play with this idea in *.test.) ...
    (news.software.readers)
  • Re: Linux-based IP video camera server
    ... These things look pretty neat and worth having a play with, ... potential sales opportunity, as I have several customers who probably want ... legally tricky if I sell one to a customer and they want the source code. ...
    (uk.comp.os.linux)
  • Re: virtualbox anyone?
    ... Is there just wmware for openbsd, or is there some other virtual machine in which openbsd can run stable and well? ...
    (comp.unix.bsd.openbsd.misc)