public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* lll_lock on PPC
@ 2004-06-22 19:36 Thorsten Kukuk
  2004-06-22 21:13 ` Steve Munroe
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kukuk @ 2004-06-22 19:36 UTC (permalink / raw)
  To: Steve Munroe; +Cc: libc-hacker


Hi,

if I look at the lll_lock implementation on ix86 and PPC, it seems
to me, that on ix86, lll_lock will only call lll_mutex_lock, if
the program is linked against libpthread. But on PPC, lll_lock is
always called, which can lead to a deadlock.

Is this correct?

  Thorsten
-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Maxfeldstr. 5                 D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lll_lock on PPC
  2004-06-22 19:36 lll_lock on PPC Thorsten Kukuk
@ 2004-06-22 21:13 ` Steve Munroe
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Munroe @ 2004-06-22 21:13 UTC (permalink / raw)
  To: Thorsten Kukuk; +Cc: libc-hacker

Thorsten Kukuk <kukuk@suse.de> wrote on 06/22/2004 02:35:04 PM:

> 
> Hi,
> 
> if I look at the lll_lock implementation on ix86 and PPC, it seems
> to me, that on ix86, lll_lock will only call lll_mutex_lock, if
> the program is linked against libpthread. But on PPC, lll_lock is
> always called, which can lead to a deadlock.
> 
> Is this correct?

For POWER lll_mutex_lock is a inline macro using 
atomic_compare_and_exchange_val_acq. lll_lock is just an alias for 
lll_mutex_lock:

        #define lll_lock(lock)          lll_mutex_lock (lock)

There is no call. See 
libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h

Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-22 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-22 19:36 lll_lock on PPC Thorsten Kukuk
2004-06-22 21:13 ` Steve Munroe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).