- Always include kprintf_slock.

- sys/lock.h -> sys/simplelock.h
This commit is contained in:
ad 2008-01-04 18:21:06 +00:00
parent 35dd6c193a
commit f479e1b23b
2 changed files with 4 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_prf.c,v 1.112 2007/12/30 22:55:21 pooka Exp $ */
/* $NetBSD: subr_prf.c,v 1.113 2008/01/04 18:21:06 ad Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.112 2007/12/30 22:55:21 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.113 2008/01/04 18:21:06 ad Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@ -78,9 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.112 2007/12/30 22:55:21 pooka Exp $")
#include <ipkdb/ipkdb.h>
#endif
#if defined(MULTIPROCESSOR)
struct simplelock kprintf_slock = SIMPLELOCK_INITIALIZER;
#endif /* MULTIPROCESSOR */
/*
* note that stdarg.h and the ansi style va_start macro is used for both

View File

@ -1,4 +1,4 @@
/* $NetBSD: kprintf.h,v 1.8 2007/07/29 09:38:02 pooka Exp $ */
/* $NetBSD: kprintf.h,v 1.9 2008/01/04 18:21:06 ad Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@ -37,8 +37,7 @@
#ifndef _SYS_KPRINTF_H_
#define _SYS_KPRINTF_H_
#include "opt_multiprocessor.h"
#include <sys/lock.h>
#include <sys/simplelock.h>
/*
* Implementation internals of the kernel printf. Exposing them here
@ -49,8 +48,6 @@
/* max size buffer kprintf needs to print quad_t [size in base 8 + \0] */
#define KPRINTF_BUFSIZE (sizeof(quad_t) * NBBY / 3 + 2)
#if defined(MULTIPROCESSOR)
extern struct simplelock kprintf_slock;
/*
@ -70,13 +67,6 @@ do { \
splx((s)); \
} while (/*CONSTCOND*/0)
#else
#define KPRINTF_MUTEX_ENTER(s) (s) = splhigh()
#define KPRINTF_MUTEX_EXIT(s) splx((s))
#endif /* MULTIPROCESSOR */
/* flags for kprintf */
#define TOCONS 0x0001 /* to the console */
#define TOTTY 0x0002 /* to the process' tty */