From d888fc4e737af84dd01cea8a7e529e101b1e06d5 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 11 Feb 2001 10:44:09 +0000 Subject: RIP . Some things needed bits of - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to (AKA ). Reviewed by: jhb --- sys/dev/cy/cy.c | 22 +++++++++++++++++++++- sys/dev/cy/cy_isa.c | 22 +++++++++++++++++++++- sys/dev/sio/sio.c | 4 ---- 3 files changed, 42 insertions(+), 6 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 374b9324149cb..9a56e2df10104 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -80,7 +80,6 @@ #include #include #include -#include #include #include @@ -91,6 +90,27 @@ #error "The cy device requires the old isa compatibility shims" #endif +#ifdef SMP + +#include /** xxx_LOCK */ + +#ifdef USE_COMLOCK +#define COM_LOCK() mtx_lock_spin(&com_mtx) +#define COM_UNLOCK() mtx_unlock_spin(&com_mtx) +#else +#define COM_LOCK() +#define COM_UNLOCK() +#endif /* USE_COMLOCK */ + +#else /* SMP */ + +#define COM_LOCK() +#define COM_UNLOCK() + +#endif /* SMP */ + +extern struct mtx com_mtx; + /* * Dictionary so that I can name everything *sio* or *com* to compare with * sio.c. There is also lots of ugly formatting and unnecessary ifdefs to diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 374b9324149cb..9a56e2df10104 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -80,7 +80,6 @@ #include #include #include -#include #include #include @@ -91,6 +90,27 @@ #error "The cy device requires the old isa compatibility shims" #endif +#ifdef SMP + +#include /** xxx_LOCK */ + +#ifdef USE_COMLOCK +#define COM_LOCK() mtx_lock_spin(&com_mtx) +#define COM_UNLOCK() mtx_unlock_spin(&com_mtx) +#else +#define COM_LOCK() +#define COM_UNLOCK() +#endif /* USE_COMLOCK */ + +#else /* SMP */ + +#define COM_LOCK() +#define COM_UNLOCK() + +#endif /* SMP */ + +extern struct mtx com_mtx; + /* * Dictionary so that I can name everything *sio* or *com* to compare with * sio.c. There is also lots of ugly formatting and unnecessary ifdefs to diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 252a376a461a3..ee3d4f180cf6e 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -80,12 +80,8 @@ #include #include #endif -#include #include -#ifndef SMP -#include -#endif #include #include -- cgit v1.3