diff options
Diffstat (limited to 'sys/dev/cy')
-rw-r--r-- | sys/dev/cy/cy.c | 22 | ||||
-rw-r--r-- | sys/dev/cy/cy_isa.c | 22 |
2 files changed, 42 insertions, 2 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 374b932..9a56e2d 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -80,7 +80,6 @@ #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/syslog.h> -#include <machine/lock.h> #include <machine/psl.h> #include <i386/isa/isa_device.h> @@ -91,6 +90,27 @@ #error "The cy device requires the old isa compatibility shims" #endif +#ifdef SMP + +#include <machine/smptests.h> /** 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 374b932..9a56e2d 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -80,7 +80,6 @@ #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/syslog.h> -#include <machine/lock.h> #include <machine/psl.h> #include <i386/isa/isa_device.h> @@ -91,6 +90,27 @@ #error "The cy device requires the old isa compatibility shims" #endif +#ifdef SMP + +#include <machine/smptests.h> /** 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 |