All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] [PATCH] linuxthreads for hppa (2/3)
@ 2003-10-10 20:45 Carlos O'Donell
  2003-10-12 21:34 ` [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2) Carlos O'Donell
  2003-10-12 21:34 ` Carlos O'Donell
  0 siblings, 2 replies; 4+ messages in thread
From: Carlos O'Donell @ 2003-10-10 20:45 UTC (permalink / raw)
  To: libc-alpha, parisc-linux

libc-alpha,

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-04  Carlos O'Donell <carlos@baldric.uwo.ca>

	* linuxthreads/sysdeps/pthread/bits/libc-lock.h:
	Use __LT_INITIALIZER_NOT_ZERO.
	* linuxthreads/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

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

* [parisc-linux] [PATCH] linuxthreads for hppa (2/3)
@ 2003-10-10 20:45 Carlos O'Donell
  0 siblings, 0 replies; 4+ messages in thread
From: Carlos O'Donell @ 2003-10-10 20:45 UTC (permalink / raw)
  To: libc-alpha, parisc-linux

libc-alpha,

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-04  Carlos O'Donell <carlos@baldric.uwo.ca>

	* linuxthreads/sysdeps/pthread/bits/libc-lock.h:
	Use __LT_INITIALIZER_NOT_ZERO.
	* linuxthreads/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

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

* [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2)
  2003-10-10 20:45 [parisc-linux] [PATCH] linuxthreads for hppa (2/3) Carlos O'Donell
@ 2003-10-12 21:34 ` Carlos O'Donell
  2003-10-12 21:34 ` Carlos O'Donell
  1 sibling, 0 replies; 4+ messages in thread
From: Carlos O'Donell @ 2003-10-12 21:34 UTC (permalink / raw)
  To: libc-alpha, parisc-linux

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

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

* [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2)
  2003-10-10 20:45 [parisc-linux] [PATCH] linuxthreads for hppa (2/3) Carlos O'Donell
  2003-10-12 21:34 ` [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2) Carlos O'Donell
@ 2003-10-12 21:34 ` Carlos O'Donell
  1 sibling, 0 replies; 4+ messages in thread
From: Carlos O'Donell @ 2003-10-12 21:34 UTC (permalink / raw)
  To: libc-alpha, parisc-linux

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

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

end of thread, other threads:[~2003-10-12 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-10 20:45 [parisc-linux] [PATCH] linuxthreads for hppa (2/3) Carlos O'Donell
2003-10-12 21:34 ` [parisc-linux] [PATCH] linuxthreads for hppa (2/3, Round 2) Carlos O'Donell
2003-10-12 21:34 ` Carlos O'Donell
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10 20:45 [parisc-linux] [PATCH] linuxthreads for hppa (2/3) Carlos O'Donell

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.