Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OsMutex.h
00001 /** 00002 ******************************************************************************* 00003 * @file OsMutex.h 00004 * @version V1.1.3 00005 * @date 2010.04.26 00006 * @brief Mutex management header file 00007 * @details This file including some defines and declare related to mutex 00008 * management. 00009 ******************************************************************************* 00010 * @copy 00011 * 00012 * INTERNAL FILE,DON'T PUBLIC. 00013 * 00014 * <h2><center>© COPYRIGHT 2009 CooCox </center></h2> 00015 ******************************************************************************* 00016 */ 00017 00018 00019 #ifndef _MUTEX_H 00020 #define _MUTEX_H 00021 00022 #include <coocox.h> 00023 00024 #if CFG_MUTEX_EN > 0 00025 00026 /*---------------------------- Resource status -------------------------------*/ 00027 #define MUTEX_FREE 0 /*!< Mutex is free */ 00028 #define MUTEX_OCCUPY 1 /*!< Mutex is occupy */ 00029 #define WAITING_MUTEX 0x80 00030 00031 /** 00032 * @struct Mutex mutex.h 00033 * @brief Mutex control block 00034 * @details This struct is use to mutex management. 00035 */ 00036 typedef struct Mutex 00037 { 00038 U8 originalPrio ; /*!< Mutex priority. */ 00039 U8 mutexFlag ; /*!< Mutex flag. */ 00040 OS_TID taskID ; /*!< Task ID. */ 00041 OS_TID hipriTaskID ; /*!< Mutex ID. */ 00042 P_OSTCB waittingList ; /*!< waitting the Mutex. */ 00043 }MUTEX,*P_MUTEX; 00044 00045 00046 /*---------------------------- Variable declare ------------------------------*/ 00047 /*!< Table use to save mutex control block. */ 00048 extern MUTEX MutexTbl [CFG_MAX_MUTEX]; 00049 extern OS_MutexID MutexFreeID ; /*!< A pointer to next vliad resource ID. */ 00050 00051 00052 /*---------------------------- Function declare ------------------------------*/ 00053 extern void RemoveMutexList(P_OSTCB ptcb); 00054 00055 #endif /* CFG_MUTEX_EN */ 00056 00057 #endif /* _MUTEX_H */
Generated on Tue Jul 12 2022 15:09:51 by
 1.7.2
 1.7.2