diff options
author | Ed Nash <ed.nash@timesys.com> | 2013-02-06 15:48:38 -0500 |
---|---|---|
committer | Ed Nash <ed.nash@timesys.com> | 2013-02-17 18:49:01 -0500 |
commit | 64d3336b3a83c44f9cab909c07a22d805aade63b (patch) | |
tree | 56867f3259105353047fbf478f417f39feb24d82 /include | |
parent | c3a8aceebb13cbc4d50bd8a3a781f4ec9ef14951 (diff) |
add semaphore protection with MQX of I2C bus
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mvf_sema4.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mvf_sema4.h b/include/linux/mvf_sema4.h new file mode 100644 index 000000000000..898065afb23f --- /dev/null +++ b/include/linux/mvf_sema4.h @@ -0,0 +1,15 @@ +#ifndef __MVF_SEMA4__ +#define __MVF_SEMA4__ + +typedef struct mvf_sema4_handle_struct { + int gate_num; + int use_interrupts; + wait_queue_head_t wait_queue; +} MVF_SEMA4; + +int mvf_sema4_assign(int gate_num, bool use_interrupts, MVF_SEMA4** sema4_p); +int mvf_sema4_deassign(MVF_SEMA4 *sema4); +int mvf_sema4_lock(MVF_SEMA4 *sema4, unsigned int timeout_us); +int mvf_sema4_unlock(MVF_SEMA4 *sema4); + +#endif |