diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-02-19 19:55:40 +0000 |
commit | 89376b7141edb6f927fb940c27391cda6e67c785 (patch) | |
tree | 57dd01fd9328b879289493ba848ae5c34c607b91 /bsd_eth_drivers/libbsdport/mutex.h | |
download | libbsdport-89376b7141edb6f927fb940c27391cda6e67c785.tar.bz2 |
Initial import.initial
Diffstat (limited to 'bsd_eth_drivers/libbsdport/mutex.h')
-rw-r--r-- | bsd_eth_drivers/libbsdport/mutex.h | 55 |
1 files changed, 55 insertions, 0 deletions
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 |