RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
结构体 | |
struct | rt_event |
宏定义 | |
#define | RT_EVENT_FLAG_AND 0x01 |
#define | RT_EVENT_FLAG_OR 0x02 |
#define | RT_EVENT_FLAG_CLEAR 0x04 |
类型定义 | |
typedef struct rt_event * | rt_event_t |
typedef struct rt_event* rt_event_t |
rt_err_t rt_event_init | ( | rt_event_t | event, |
const char * | name, | ||
rt_uint8_t | flag ) |
The function will initialize a static event object.
event | is a pointer to the event to initialize. It is assumed that storage for the event will be allocated in your application. |
name | is a pointer to the name that given to the event. |
flag | is the event flag, which determines the queuing way of how multiple threads wait when the event is not available. The event flag can be ONE of the following values: RT_IPC_FLAG_PRIO The pending threads will queue in order of priority. RT_IPC_FLAG_FIFO The pending threads will queue in the first-in-first-out method (also known as first-come-first-served (FCFS) scheduling strategy). NOTE: RT_IPC_FLAG_FIFO is a non-real-time scheduling mode. It is strongly recommended to use RT_IPC_FLAG_PRIO to ensure the thread is real-time UNLESS your applications concern about the first-in-first-out principle, and you clearly understand that all threads involved in this event will become non-real-time threads. |
引用了 _ipc_object_init(), rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_IPC_FLAG_FIFO, RT_IPC_FLAG_PRIO, RT_NULL, RT_Object_Class_Event, rt_object_init(), rt_spin_lock_init() , 以及 rt_event::spinlock.
RTM_EXPORT | ( | rt_event_init | ) |
rt_err_t rt_event_detach | ( | rt_event_t | event | ) |
This function will detach a static event object.
event | is a pointer to an event object to be detached. |
引用了 rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_NULL, RT_Object_Class_Event, rt_object_detach(), rt_object_get_type(), rt_object_is_systemobject(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore(), rt_susp_list_resume_all(), rt_event::spinlock , 以及 rt_ipc_object::suspend_thread.
RTM_EXPORT | ( | rt_event_detach | ) |
rt_event_t rt_event_create | ( | const char * | name, |
rt_uint8_t | flag ) |
Creating an event object.
name | is a pointer to the name that given to the event. |
flag | is the event flag, which determines the queuing way of how multiple threads wait when the event is not available. The event flag can be ONE of the following values: RT_IPC_FLAG_PRIO The pending threads will queue in order of priority. RT_IPC_FLAG_FIFO The pending threads will queue in the first-in-first-out method (also known as first-come-first-served (FCFS) scheduling strategy). NOTE: RT_IPC_FLAG_FIFO is a non-real-time scheduling mode. It is strongly recommended to use RT_IPC_FLAG_PRIO to ensure the thread is real-time UNLESS your applications concern about the first-in-first-out principle, and you clearly understand that all threads involved in this event will become non-real-time threads. |
引用了 _ipc_object_init(), rt_object::flag, rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_DEBUG_NOT_IN_INTERRUPT, RT_IPC_FLAG_FIFO, RT_IPC_FLAG_PRIO, RT_NULL, rt_object_allocate(), RT_Object_Class_Event, rt_spin_lock_init() , 以及 rt_event::spinlock.
RTM_EXPORT | ( | rt_event_create | ) |
rt_err_t rt_event_delete | ( | rt_event_t | event | ) |
This function will delete an event object and release the memory space.
event | is a pointer to an event object to be deleted. |
引用了 rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_DEBUG_NOT_IN_INTERRUPT, RT_FALSE, RT_NULL, RT_Object_Class_Event, rt_object_delete(), rt_object_get_type(), rt_object_is_systemobject(), rt_spin_lock(), rt_spin_unlock(), rt_susp_list_resume_all(), rt_event::spinlock , 以及 rt_ipc_object::suspend_thread.
RTM_EXPORT | ( | rt_event_delete | ) |
rt_err_t rt_event_send | ( | rt_event_t | event, |
rt_uint32_t | set ) |
This function will send an event to the event object. If there is a thread suspended on the event, the thread will be resumed.
event | is a pointer to the event object to be sent. |
set | is a flag that you will set for this event's flag. You can set an event flag, or you can set multiple flags through OR logic operation. |
引用了 rt_thread::error, rt_thread::event_info, rt_thread::event_set, rt_list_node::next, rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_EVENT_FLAG_AND, RT_EVENT_FLAG_CLEAR, RT_EVENT_FLAG_OR, RT_FALSE, rt_list_isempty(), RT_NULL, RT_Object_Class_Event, rt_object_get_type(), RT_OBJECT_HOOK_CALL, rt_sched_lock(), rt_sched_thread_ready(), rt_sched_unlock(), rt_schedule(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore(), RT_THREAD_LIST_NODE_ENTRY, RT_TRUE, rt_event::set, rt_event::spinlock , 以及 rt_ipc_object::suspend_thread.
RTM_EXPORT | ( | rt_event_send | ) |
rt_err_t rt_event_recv | ( | rt_event_t | event, |
rt_uint32_t | set, | ||
rt_uint8_t | option, | ||
rt_int32_t | timeout, | ||
rt_uint32_t * | recved ) |
RTM_EXPORT | ( | rt_event_recv | ) |
rt_err_t rt_event_recv_interruptible | ( | rt_event_t | event, |
rt_uint32_t | set, | ||
rt_uint8_t | option, | ||
rt_int32_t | timeout, | ||
rt_uint32_t * | recved ) |
RTM_EXPORT | ( | rt_event_recv_interruptible | ) |
rt_err_t rt_event_recv_killable | ( | rt_event_t | event, |
rt_uint32_t | set, | ||
rt_uint8_t | option, | ||
rt_int32_t | timeout, | ||
rt_uint32_t * | recved ) |
RTM_EXPORT | ( | rt_event_recv_killable | ) |
rt_err_t rt_event_control | ( | rt_event_t | event, |
int | cmd, | ||
void * | arg ) |
This function will set some extra attributions of an event object.
event | is a pointer to an event object. |
cmd | is a command word used to configure some attributions of the event. |
arg | is the argument of the function to execute the command. |
引用了 rt_event::parent, rt_ipc_object::parent, RT_ASSERT, RT_IPC_CMD_RESET, RT_NULL, RT_Object_Class_Event, rt_object_get_type(), rt_schedule(), rt_spin_lock_irqsave(), rt_spin_unlock_irqrestore(), rt_susp_list_resume_all(), RT_UNUSED, rt_event::spinlock , 以及 rt_ipc_object::suspend_thread.
RTM_EXPORT | ( | rt_event_control | ) |