#ifdefRT_USING_MUTEX structrt_mutex { structrt_ipc_objectparent;/**< inherit from ipc_object */ rt_uint16_tvalue;/**< value of mutex */ rt_uint8_toriginal_priority;/**< priority of last thread hold the mutex */ rt_uint8_thold;/**< numbers of thread hold the mutex */ structr...
一、互斥量控制块:在include/rtdef.h中 #ifdef RT_USING_MUTEX/** * Mutual exclusion (mutex) structure*/structrt_mutex {structrt_ipc_object parent;/**< inherit from ipc_object*/ //派生自IPC对象rt_uint16_t value;/**< value of mutex*/ //此互斥锁的值rt_uint8_t original_priority;/**...
3RT_TIMER_THREAD_STACK_SIZE /* 定时器线程栈大小,单位为sizeof(rt_uint8_t) */ 4RT_USING_MUTEX /* 使用FreeRTOS互斥量时必须开启*/ 5RT_USING_SEMAPHORE /* 使用FreeRTOS信号量时必须开启*/ 6RT_USING_HEAP /* 使用FreeRTOS动态内存分配时必须开启*/ 7RT_TICK_PER_SECOND /* 相当于FreeRTOS confi...
#ifdef RT_USING_MUTEX/*** This function will initialize a mutex and put it under control of resource* management.** @param mutex the mutex object* @param name the name of mutex* @param flag the flag of mutex** @return the operation status, RT_EOK on successful*///初始化静态互斥量rt...
/* include/rtdef.h */#ifdef RT_USING_MUTEX/*** Mutual exclusion (mutex) structure*/structrt_mutex{structrt_ipc_objectparent;/**< inherit from ipc_object */rt_uint16_tvalue;/**< value of mutex */rt_uint8_toriginal_priority;/**< priority of last thread hold the mutex */rt_uint...
#ifdef RT_USING_MUTEX /** * Mutual exclusion (mutex) structure * parent 继承ipc类 * value 互斥量的值 * original_priority 持有线程的原始优先级 * hold 持有线程的持有次数,可以多次获得 * *owner 当前拥有互斥量的线程 */ struct rt_mutex ...
#ifdef RT_USING_MUTEX/* initialize object container - mutex */{RT_Object_Class_Mutex,_OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Mutex),sizeof(struct rt_mutex)},#endif #ifdef RT_USING_EVENT/* initialize object container - event */{RT_Object_Class_Event,_OBJ_CONTAINER_LIST_INIT(RT_Object_In...
#define RT_USING_SEMAPHORE // 设置是否使用 信号量 //#define RT_USING_MUTEX // 设置是否使用 互斥量 //#define RT_USING_EVENT // 设置是否使用 事件集 #define RT_USING_MAILBOX // 设置是否使用 邮箱 //#define RT_USING_MESSAGEQUEUE // 设置是否使用 消息队列 ...
// Using Mutex //#define RT_USING_MUTEX // 打开此宏则使能互斥量的使用 // // Using Event // Using Event //#define RT_USING_EVENT // 打开此宏则使能事件集的使用 // // Using MailBox // Using MailBox //#define RT_USING_MAILBOX // 打开此宏则使能邮箱的使用 // /...
#ifdefRT_USING_MUTEX/** * Mutual exclusion (mutex) structure * parent 继承ipc类 * value 互斥量的值 * original_priority 持有线程的原始优先级 * hold 持有线程的持有次数,可以多次获得 * *owner 当前拥有互斥量的线程 */structrt_mutex{structrt_ipc_objectparent;/**< inherit from ipc_object */rt...