summaryrefslogtreecommitdiff
path: root/libthreads
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-10-24 19:29:49 +0000
committerThomas Bushnell <thomas@gnu.org>1996-10-24 19:29:49 +0000
commit535f8e46a030eda99b08e7a4fd03b0e6cdaa6d5e (patch)
treee904d6648073efc7527440076f95c877f3fa2477 /libthreads
parente55ef2526c963f88b0cfe1f39dab0131377a1ae4 (diff)
Mon Oct 21 22:05:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* i386/csw.S (CALL_MCOUNT): New macro. (cproc_swtich, cproc_start_wait, cproc_prepare): Use CALL_MCOUNT. * rwlock.h: Change extern inline protection to use new canonical method. * rwlock.c: Rewritten.
Diffstat (limited to 'libthreads')
-rw-r--r--libthreads/ChangeLog9
-rw-r--r--libthreads/rwlock.c8
-rw-r--r--libthreads/rwlock.h19
3 files changed, 18 insertions, 18 deletions
diff --git a/libthreads/ChangeLog b/libthreads/ChangeLog
index ddf480ee..db5eb9e3 100644
--- a/libthreads/ChangeLog
+++ b/libthreads/ChangeLog
@@ -1,3 +1,12 @@
+Mon Oct 21 22:05:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * i386/csw.S (CALL_MCOUNT): New macro.
+ (cproc_swtich, cproc_start_wait, cproc_prepare): Use CALL_MCOUNT.
+
+ * rwlock.h: Change extern inline protection to use new canonical
+ method.
+ * rwlock.c: Rewritten.
+
Wed Sep 4 09:06:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* Makefile (VPATH): Look in $(asm_syntax) instead of old
diff --git a/libthreads/rwlock.c b/libthreads/rwlock.c
index 6fcb08c4..93533a97 100644
--- a/libthreads/rwlock.c
+++ b/libthreads/rwlock.c
@@ -1,6 +1,2 @@
-/* This file defines the real functions for the inlines in rwlock.h. */
-
-#include <cthreads.h>
-
-#define _RWLOCK_DEFINE_FUNCTIONS /* Define the real functions. */
-#include <rwlock.h>
+#define RWLOCK_EI
+#include "rwlock.h"
diff --git a/libthreads/rwlock.h b/libthreads/rwlock.h
index 7abbfff1..1a61eeea 100644
--- a/libthreads/rwlock.h
+++ b/libthreads/rwlock.h
@@ -31,17 +31,12 @@ struct rwlock
int readers_waiting;
};
-#ifdef _RWLOCK_DEFINE_FUNCTIONS
-#undef _EXTERN_INLINE
-#define _EXTERN_INLINE
-#else /* ! _RWLOCK_DEFINE_FUNCTIONS */
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#ifndef RWLOCK_EI
+#define RWLOCK_EI extern inline
#endif
-#endif /* _RWLOCK_DEFINE_FUNCTIONS */
/* Get a reader lock on reader-writer lock LOCK for disknode DN */
-_EXTERN_INLINE void
+RWLOCK_EI void
rwlock_reader_lock (struct rwlock *lock)
{
mutex_lock (&lock->master);
@@ -58,7 +53,7 @@ rwlock_reader_lock (struct rwlock *lock)
}
/* Get a writer lock on reader-writer lock LOCK for disknode DN */
-_EXTERN_INLINE void
+RWLOCK_EI void
rwlock_writer_lock (struct rwlock *lock)
{
mutex_lock (&lock->master);
@@ -75,7 +70,7 @@ rwlock_writer_lock (struct rwlock *lock)
}
/* Release a reader lock on reader-writer lock LOCK for disknode DN */
-_EXTERN_INLINE void
+RWLOCK_EI void
rwlock_reader_unlock (struct rwlock *lock)
{
mutex_lock (&lock->master);
@@ -87,7 +82,7 @@ rwlock_reader_unlock (struct rwlock *lock)
}
/* Release a writer lock on reader-writer lock LOCK for disknode DN */
-_EXTERN_INLINE void
+RWLOCK_EI void
rwlock_writer_unlock (struct rwlock *lock)
{
mutex_lock (&lock->master);
@@ -99,7 +94,7 @@ rwlock_writer_unlock (struct rwlock *lock)
}
/* Initialize reader-writer lock LOCK */
-_EXTERN_INLINE void
+RWLOCK_EI void
rwlock_init (struct rwlock *lock)
{
mutex_init (&lock->master);