ubinos
mutex.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 Sung Ho Park
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef UBIK_MUTEX_H_
8 #define UBIK_MUTEX_H_
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
227 #include <ubinos_config.h>
228 #include <ubinos/type.h>
229 
231 #define MUTEX_OPT__NOPRIORITYINHERITANCE 0x80
232 
234 typedef struct __mutex_tip_t
235 {
236  unsigned int type :8;
237  unsigned int valid :1;
238  unsigned int reserved :7;
239  unsigned int reserved2 :16;
241 
244 
256 int mutex_create(mutex_pt * mutex_p);
257 
273 int mutex_create_ext(mutex_pt * mutex_p, unsigned int option);
274 
288 int mutex_delete(mutex_pt * mutex_p);
289 
303 int mutex_lock(mutex_pt mutex);
304 
322 int mutex_lock_timed(mutex_pt mutex, unsigned int tick);
323 
341 int mutex_lock_timedms(mutex_pt mutex, unsigned int timems);
342 
355 
369 
370 #ifdef __cplusplus
371 }
372 #endif
373 
374 #endif /* UBIK_MUTEX_H_ */
int mutex_unlock(mutex_pt mutex)
int mutex_lock_timedms(mutex_pt mutex, unsigned int timems)
int mutex_create_ext(mutex_pt *mutex_p, unsigned int option)
int mutex_lock_timed(mutex_pt mutex, unsigned int tick)
struct __mutex_tip_t _mutex_tip_t
int mutex_create(mutex_pt *mutex_p)
_mutex_tip_t * mutex_pt
Definition: mutex.h:243
int mutex_delete(mutex_pt *mutex_p)
int mutex_islocked(mutex_pt mutex)
int mutex_lock(mutex_pt mutex)
Definition: mutex.h:235
unsigned int type
Definition: mutex.h:236
unsigned int reserved
Definition: mutex.h:238
unsigned int reserved2
Definition: mutex.h:239
unsigned int valid
Definition: mutex.h:237
ubinos basic data type