From 89376b7141edb6f927fb940c27391cda6e67c785 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 19 Feb 2009 19:55:40 +0000 Subject: Initial import. --- bsd_eth_drivers/libbsdport/mutex.h | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 bsd_eth_drivers/libbsdport/mutex.h (limited to 'bsd_eth_drivers/libbsdport/mutex.h') diff --git a/bsd_eth_drivers/libbsdport/mutex.h b/bsd_eth_drivers/libbsdport/mutex.h new file mode 100644 index 0000000..5476e37 --- /dev/null +++ b/bsd_eth_drivers/libbsdport/mutex.h @@ -0,0 +1,55 @@ +#ifndef _RTEMS_BSDNET_MUTEX_H +#define _RTEMS_BSDNET_MUTEX_H + +/* NOTE: mutexes should never be necessary since + * the RTEMS BSD code protects everything with a + * big fat lock + */ + +struct mtx { + rtems_id mtx_id; +}; + +#define MTX_DEF 0 /* default sleeping lock */ +#define MTX_RECURSE 4 /* nesting */ + +#define MTX_NETWORK_LOCK "xxx" + +static inline void +mtx_init(struct mtx *m, const char *name, const char *type, int opts) +{ + /* Set ID to zero in case they want to submit this mutex + * to callout_init_mtx() + */ + m->mtx_id = 0; +} + +static inline int +mtx_initialized(struct mtx *m) +{ + return m->mtx_id == 0; +} + +static inline void +mtx_lock(struct mtx *m) +{ +} + +static inline void +mtx_unlock(struct mtx *m) +{ +} + +static inline void +mtx_destroy(struct mtx *m) +{ +} + +/* what ? */ +#define MA_OWNED 1 +static inline void +mtx_assert(struct mtx *m, int what) +{ +} + +#endif -- cgit v1.2.3