| @@ -1,26 +1,22 @@ | | | @@ -1,26 +1,22 @@ |
1 | #ifndef _NBCOMPAT_H_ | | 1 | #ifndef _NBCOMPAT_H_ |
2 | #define _NBCOMPAT_H_ | | 2 | #define _NBCOMPAT_H_ |
3 | | | 3 | |
4 | #include <sys/systm.h> | | 4 | #include <sys/systm.h> |
5 | #include <sys/module.h> | | 5 | #include <sys/module.h> |
6 | #include <sys/cdefs.h> | | 6 | #include <sys/cdefs.h> |
7 | #include <sys/queue.h> | | 7 | #include <sys/queue.h> |
8 | #include <sys/mutex.h> | | 8 | #include <sys/mutex.h> |
9 | #ifdef _KERNEL | | | |
10 | #include <sys/device.h> | | 9 | #include <sys/device.h> |
11 | #else | | | |
12 | typedef struct device *device_t; | | | |
13 | #endif | | | |
14 | | | 10 | |
15 | #define CTLFLAG_RW CTLFLAG_READWRITE | | 11 | #define CTLFLAG_RW CTLFLAG_READWRITE |
16 | | | 12 | |
17 | #define mtx kmutex | | 13 | #define mtx kmutex |
18 | #define mtx_init(mtx, desc, type, opts) mutex_init(mtx, MUTEX_DEFAULT, IPL_NONE) | | 14 | #define mtx_init(mtx, desc, type, opts) mutex_init(mtx, MUTEX_DEFAULT, IPL_NONE) |
19 | /* | | 15 | /* |
20 | #define mtx_lock(mtx) ndis_mtx_ipl = splnet() mutex_enter(mtx) | | 16 | #define mtx_lock(mtx) ndis_mtx_ipl = splnet() mutex_enter(mtx) |
21 | #define mtx_unlock(mtx) splx(ndis_mtx_ipl) mutex_exit(mtx) | | 17 | #define mtx_unlock(mtx) splx(ndis_mtx_ipl) mutex_exit(mtx) |
22 | */ | | 18 | */ |
23 | | | 19 | |
24 | void mtx_lock(struct mtx *mutex); | | 20 | void mtx_lock(struct mtx *mutex); |
25 | void mtx_unlock(struct mtx *mutex); | | 21 | void mtx_unlock(struct mtx *mutex); |
26 | | | 22 | |