Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h.

This commit is contained in:
Steve Passe 1997-08-21 05:47:25 +00:00
parent 201ef2f3f3
commit b3e4e390f6
7 changed files with 23 additions and 62 deletions

View File

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: cy.c,v 1.1 1997/08/20 05:59:24 smp Exp smp $
* $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@ -84,15 +84,6 @@
#include <machine/clock.h>
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>

View File

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: cy.c,v 1.1 1997/08/20 05:59:24 smp Exp smp $
* $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@ -84,15 +84,6 @@
#include <machine/clock.h>
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.174 1997/08/04 19:12:54 fsmp Exp $
* $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
* $Id: param.h,v 1.9 1997/08/21 04:48:45 smp Exp smp $
* $Id: param.h,v 1.35 1997/08/21 05:07:56 fsmp Exp $
*/
#ifndef _MACHINE_PARAM_H_
@ -214,10 +214,25 @@
#define SYSCALL_LOCK /* NOP */
#define ALTSYSCALL_LOCK /* NOP */
#endif /* SMP */
#endif /* SMP */
#else /* LOCORE */
#ifdef SMP
/*
* Protects com/tty data as a critical region.
*/
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else /* SMP */
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
/*
* A simple spin lock.
*

View File

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: cy.c,v 1.1 1997/08/20 05:59:24 smp Exp smp $
* $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@ -84,15 +84,6 @@
#include <machine/clock.h>
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.174 1997/08/04 19:12:54 fsmp Exp $
* $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.174 1997/08/04 19:12:54 fsmp Exp $
* $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
#ifdef SMP
#include <machine/smp.h>
#define COM_LOCK() s_lock(&com_lock)
#define COM_UNLOCK() s_unlock(&com_lock)
#else
#define COM_LOCK()
#define COM_UNLOCK()
#endif /* SMP */
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,