GadgetSeed  0.9.6
mutex.h
[詳解]
1 /** @file
2  @brief MUTEX制御
3 
4  @date 2011.03.20
5  @author Takashi SHUDO
6 */
7 
8 #ifndef MUTEX_H
9 #define MUTEX_H
10 
11 #include "task.h"
12 
13 struct st_mutex {
14  struct st_queue list; ///< MUTEXのキュー
15  struct st_tcb *lock_ps; ///< ロックしているタスク
16  struct st_queue wait_ps; ///< アンロック待ちタスクキュー
17  const char *name; ///< MUTEX名文字列
18 }; ///< MUTEX
19 
20 void mutex_register_ISR(struct st_mutex *mutex, const char *name);
21 int mutex_unregister_ISR(struct st_mutex *mutex);
22 
23 void mutex_lock_ISR(void *sp, struct st_mutex *mutex, unsigned int timeout);
24 void mutex_unlock_ISR(void *sp, struct st_mutex *mutex);
25 
26 #endif // MUTEX_H
struct st_queue list
MUTEXのキュー
Definition: mutex.h:14
キュー構造
Definition: queue.h:13
MUTEX
Definition: mutex.h:13
struct st_tcb * lock_ps
ロックしているタスク
Definition: mutex.h:15
タスク制御
struct st_queue wait_ps
アンロック待ちタスクキュー
Definition: mutex.h:16
タスクコンテキスト
Definition: tcb.h:32
void mutex_register_ISR(struct st_mutex *mutex, const char *name)
MUTEXを登録する
Definition: mutex.c:37
int mutex_unregister_ISR(struct st_mutex *mutex)
MUTEXを登録解除する
Definition: mutex.c:56
const char * name
MUTEX名文字列
Definition: mutex.h:17