All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] Problem with threads..
Date: Sun, 30 Dec 2001 10:42:22 -0800	[thread overview]
Message-ID: <20011230184222.GC2179@tausq.org> (raw)
In-Reply-To: <20011229235830.4bfec5f9.csuder@cisco.com>

> > fwiw, what i've seen elsewhere is that on palinux, you have to make sure
> > the mutex is initialized before locking works. on other platforms
> > sometimes you can get away with doing a lock without a mutex init.
> 
> Yes !!! There was one of 4 mutex not initialized, added that one and now
> it works.

Just to clarify...

hppa is the only platform supported by linuxthreads right now where we 
initialize the mutex variable to 1 so that we can do locking using ldcw. On 
other platforms, locks are initialized to 0 and locking is done using things 
like test-and-set.

In general, you always need to call pthread_mutex_init for mutexes to
work. In the case of pan, the mutex variable is declared static, so it
is automatically initialized to 0.

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^

  parent reply	other threads:[~2001-12-30 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-29  9:24 [parisc-linux] Problem with threads Christian Suder
2001-12-29 12:42 ` andi
2001-12-30  6:44 ` Randolph Chung
2001-12-30  7:58   ` Christian Suder
2001-12-30  8:49     ` Randolph Chung
2001-12-30 18:42     ` Randolph Chung [this message]
2001-12-30 21:55       ` andi
2001-12-31  5:07         ` Randolph Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011230184222.GC2179@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.