Lines Matching refs:queue
20 #include "c/queue.h"
29 /* highest priority, should be distributed until the tasks in the queue are completed */
37 /* lowest priority, sorted by handle time, only distribute when there is no other level inside queue. */
42 * @brief Submits a task to a queue, for tasks with the same delay, insert the header.
44 * @param queue Indicates a queue handle.
49 FFRT_C_API void ffrt_queue_submit_head(ffrt_queue_t queue, ffrt_function_header_t* f, const ffrt_task_attr_t* attr);
52 * @brief Submits a task to the queue, and obtains a task handle, for tasks with the same delay, insert the header.
54 * @param queue Indicates a queue handle.
62 ffrt_queue_t queue, ffrt_function_header_t* f, const ffrt_task_attr_t* attr);
65 * @brief Checks whether a task with the given name can be found in the queue.
67 * @param queue Indicates a queue handle.
72 FFRT_C_API bool ffrt_queue_has_task(ffrt_queue_t queue, const char* name);
75 * @brief Cancels all unexecuted tasks in the queue.
77 * @param queue Indicates a queue handle.
80 FFRT_C_API void ffrt_queue_cancel_all(ffrt_queue_t queue);
83 * @brief Cancels all unexecuted tasks and wait for running tasks in the queue.
85 * @param queue Indicates a queue handle.
88 FFRT_C_API void ffrt_queue_cancel_and_wait(ffrt_queue_t queue);
91 * @brief Cancels a task with the given name in the queue.
93 * @param queue Indicates a queue handle.
99 FFRT_C_API int ffrt_queue_cancel_by_name(ffrt_queue_t queue, const char* name);
102 * @brief Checks whether the queue is idle.
104 * @param queue Indicates a queue handle.
105 * @return Returns whether the queue is idle.
108 FFRT_C_API bool ffrt_queue_is_idle(ffrt_queue_t queue);
111 * @brief Dumps queue information;
114 * @param queue Indicates a queue handle.
123 FFRT_C_API int ffrt_queue_dump(ffrt_queue_t queue, const char* tag, char* buf, uint32_t len, bool history_info);
126 * @brief Dumps queue task count with specified priority.
128 * @param queue Indicates a queue handle.
129 * @param priority Indicates the execute priority of queue task.
134 FFRT_C_API int ffrt_queue_size_dump(ffrt_queue_t queue, ffrt_inner_queue_priority_t priority);
137 * @brief Binds an eventhandler object to the queue.
139 * @param queue Indicates a queue handle.
143 FFRT_C_API void ffrt_queue_set_eventhandler(ffrt_queue_t queue, void* eventhandler);
146 * @brief Obtains the handler bound to the queue that is being executed on the current worker.