Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Back out mistaken commits.
details: https://anonhg.NetBSD.org/src/rev/f8c4d7aafeac
branches: trunk
changeset: 499389:f8c4d7aafeac
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Sun Nov 19 00:56:39 2000 +0000
description:
Back out mistaken commits.
diffstat:
sys/sys/lock.h | 14 +++++++-------
sys/sys/proc.h | 19 ++++---------------
sys/sys/systm.h | 6 +++---
3 files changed, 14 insertions(+), 25 deletions(-)
diffs (101 lines):
diff -r cab1470cd106 -r f8c4d7aafeac sys/sys/lock.h
--- a/sys/sys/lock.h Sun Nov 19 00:54:50 2000 +0000
+++ b/sys/sys/lock.h Sun Nov 19 00:56:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.38 2000/11/19 00:54:50 sommerfeld Exp $ */
+/* $NetBSD: lock.h,v 1.39 2000/11/19 00:56:39 sommerfeld Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -283,11 +283,12 @@
void spinlock_switchcheck(void);
#endif
-void spinlockinit(struct lock *, const char *, int);
-int spinlockmgr(__volatile struct lock *, u_int flags, struct simplelock *);
-int spinlock_acquire_exclusive(__volatile struct lock *, u_int);
-int spinlock_acquire_shared(__volatile struct lock *, u_int);
-void spinlock_release(__volatile struct lock *);
+#define spinlockinit(lkp, name, flags) \
+ lockinit((lkp), 0, (name), 0, (flags) | LK_SPIN)
+
+#define spinlockmgr(lkp, flags, intrlk) \
+ lockmgr((lkp), (flags) | LK_SPIN, (intrlk))
+
int spinlock_release_all(__volatile struct lock *);
void spinlock_acquire_count(__volatile struct lock *, int);
@@ -308,7 +309,6 @@
void simple_lock_dump(void);
void simple_lock_freecheck(void *, void *);
void simple_lock_switchcheck(void);
-void simplelock_sleeplock_check(struct simplelock *);
#elif defined(MULTIPROCESSOR)
#define simple_lock_init(alp) __cpu_simple_lock_init(&(alp)->lock_data)
#define simple_lock(alp) __cpu_simple_lock(&(alp)->lock_data)
diff -r cab1470cd106 -r f8c4d7aafeac sys/sys/proc.h
--- a/sys/sys/proc.h Sun Nov 19 00:54:50 2000 +0000
+++ b/sys/sys/proc.h Sun Nov 19 00:56:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.109 2000/11/19 00:54:50 sommerfeld Exp $ */
+/* $NetBSD: proc.h,v 1.110 2000/11/19 00:56:39 sommerfeld Exp $ */
/*-
* Copyright (c) 1986, 1989, 1991, 1993
@@ -358,6 +358,9 @@
extern struct proc proc0; /* Process slot for swapper. */
extern int nprocs, maxproc; /* Current and max number of procs. */
+/* Process list lock; see kern_proc.c for locking protocol details. */
+extern struct lock proclist_lock;
+
extern struct proclist allproc; /* List of all processes. */
extern struct proclist zombproc; /* List of zombie processes. */
@@ -415,24 +418,10 @@
int proc_isunder __P((struct proc *, struct proc*));
-#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
-/* Process list lock; see kern_proc.c for locking protocol details. */
-extern struct lock proclist_lock;
-
void proclist_lock_read __P((void));
void proclist_unlock_read __P((void));
int proclist_lock_write __P((void));
void proclist_unlock_write __P((int));
-
-#else
-
-#define proclist_lock_read() /* nothing */
-#define proclist_unlock_read()
-#define proclist_lock_write() splclock()
-#define proclist_unlock_write(s) splx(s)
-
-#endif
-
void p_sugid __P((struct proc*));
/* Compatbility with old, non-interlocked tsleep call. */
diff -r cab1470cd106 -r f8c4d7aafeac sys/sys/systm.h
--- a/sys/sys/systm.h Sun Nov 19 00:54:50 2000 +0000
+++ b/sys/sys/systm.h Sun Nov 19 00:56:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.121 2000/11/19 00:54:50 sommerfeld Exp $ */
+/* $NetBSD: systm.h,v 1.122 2000/11/19 00:56:39 sommerfeld Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -405,10 +405,10 @@
#define KERNEL_LOCK(flag) \
do { \
SCHED_ASSERT_UNLOCKED(); \
- spinlock_acquire_exclusive(&kernel_lock, flag); \
+ spinlockmgr(&kernel_lock, (flag), 0); \
} while (0)
-#define KERNEL_UNLOCK() spinlock_release(&kernel_lock)
+#define KERNEL_UNLOCK() spinlockmgr(&kernel_lock, LK_RELEASE, 0)
/*
* Acquire/release kernel lock on behalf of a process.
Home |
Main Index |
Thread Index |
Old Index