From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: libc-alpha <libc-alpha@sources.redhat.com>,
parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2)
Date: Sun, 12 Oct 2003 17:34:26 -0400 [thread overview]
Message-ID: <20031012213426.GG23999@systemhalted> (raw)
In-Reply-To: <20031010204537.GG6454@systemhalted>
libc-alpha,
Changes:
a. Fixed formatting.
b. Fixed Changelog entry.
---
2. Linuxthreads sysdep changes.
This patch represents the minor changes required in linuxthreads sysdeps to
accomodate for hppa's special lock requirements (e.g. A structure instead of
an integer).
The changes are minor and require that __LT_SPINLOCK_INIT no longer be used in
a macro comparison since it's now a structure. A different define
(__LT_INITIALIZER_NOT_ZERO) is used to indicate an architecture that does not
initialize a lock to zero.
Cheers,
Carlos.
===
linuxthreads/sysdeps/pthread/bits/libc-lock.h | 6 +++---
linuxthreads/sysdeps/pthread/bits/pthreadtypes.h | 8 +++++---
2 files changed, 8 insertions(+), 6 deletions(-)
===
2003-10-12 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/pthread/bits/libc-lock.h:
Use __LT_INITIALIZER_NOT_ZERO.
* sysdeps/pthread/bits/pthreadtypes.h:
spinlock in struct _pthread_fastlock is __atomic_lock_t.
diff -urN glibc-2.3.1.orig/linuxthreads/sysdeps/pthread/bits/libc-lock.h glibc-2.3.1/linuxthreads/sysdeps/pthread/bits/libc-lock.h
--- glibc-2.3.1.orig/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2003-01-15 12:58:35.000000000 -0500
+++ glibc-2.3.1/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2003-01-15 18:24:36.000000000 -0500
@@ -71,12 +71,12 @@
initialized locks must be set to one due to the lack of normal
atomic operations.) */
-#if __LT_SPINLOCK_INIT == 0
+#ifdef __LT_INITIALIZER_NOT_ZERO
# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
+ CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
#else
# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
+ CLASS __libc_lock_t NAME;
#endif
#define __libc_rwlock_define_initialized(CLASS,NAME) \
diff -urN glibc-2.3.1.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h glibc-2.3.1/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
--- glibc-2.3.1.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-01-15 12:58:35.000000000 -0500
+++ glibc-2.3.1/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-01-15 18:24:36.000000000 -0500
@@ -22,12 +22,14 @@
#define __need_schedparam
#include <bits/sched.h>
+typedef int __atomic_lock_t;
+
/* Fast locks (not abstract because mutexes and conditions aren't abstract). */
struct _pthread_fastlock
{
- long int __status; /* "Free" or "taken" or head of waiting list */
- int __spinlock; /* Used by compare_and_swap emulation. Also,
- adaptive SMP lock stores spin count here. */
+ long int __status; /* "Free" or "taken" or head of waiting list */
+ __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also,
+ adaptive SMP lock stores spin count here. */
};
#ifndef _PTHREAD_DESCR_DEFINED
next prev parent reply other threads:[~2003-10-12 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-10 20:45 [parisc-linux] [PATCH] linuxthreads for hppa (2/3) Carlos O'Donell
2003-10-12 21:34 ` Carlos O'Donell [this message]
2003-10-12 21:34 ` [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2) Carlos O'Donell
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=20031012213426.GG23999@systemhalted \
--to=carlos@baldric.uwo.ca \
--cc=libc-alpha@sources.redhat.com \
--cc=parisc-linux@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox