mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
add semaphore max value control. (#8390)
This commit is contained in:
@@ -1038,6 +1038,7 @@ typedef struct rt_thread *rt_thread_t;
|
||||
#define RT_IPC_CMD_UNKNOWN 0x00 /**< unknown IPC command */
|
||||
#define RT_IPC_CMD_RESET 0x01 /**< reset IPC object */
|
||||
#define RT_IPC_CMD_GET_STATE 0x02 /**< get the state of IPC object */
|
||||
#define RT_IPC_CMD_SET_VLIMIT 0x03 /**< set max limit value of IPC value */
|
||||
|
||||
#define RT_WAITING_FOREVER -1 /**< Block forever until get resource. */
|
||||
#define RT_WAITING_NO 0 /**< Non-block. */
|
||||
@@ -1061,7 +1062,7 @@ struct rt_semaphore
|
||||
struct rt_ipc_object parent; /**< inherit from ipc_object */
|
||||
|
||||
rt_uint16_t value; /**< value of semaphore. */
|
||||
rt_uint16_t reserved; /**< reserved field */
|
||||
rt_uint16_t max_value;
|
||||
struct rt_spinlock spinlock;
|
||||
};
|
||||
typedef struct rt_semaphore *rt_sem_t;
|
||||
|
||||
Reference in New Issue
Block a user