mirror of
https://gitee.com/openharmony/resourceschedule_ffrt
synced 2024-12-02 18:36:52 +00:00
rust
Signed-off-by: wanghuachen <513239407@qq.com>
This commit is contained in:
parent
99abb2b998
commit
757a39bfde
@ -42,7 +42,7 @@ FFRT_C_API int ffrt_executor_task_cancel(ffrt_executor_task_t *taask, const ffrt
|
||||
FFRT_C_API int ffrt_poller_register(int fd, uint32_t events, void* data, void(*cb)(void*, uint32_t));
|
||||
FFRT_C_API int ffrt_poller_deregister(int fd);
|
||||
FFRT_C_API int ffrt_poller_resgister_timerfunc(int(*timerFunc)());
|
||||
FFRT_C_API int ffrt_poller_wakeup();
|
||||
FFRT_C_API void ffrt_poller_wakeup();
|
||||
|
||||
FFRT_C_API void ffrt_submit_coroutine(void* co, ffrt_coroutine_ptr_t exec,
|
||||
ffrt_function_ptr_t destroy, const ffrt_deps_t* in_deps, const ffrt_deps_t* out_deps, const ffrt_task_attr_t* attr);
|
||||
|
@ -71,6 +71,7 @@ typedef int ffrt_qos_t;
|
||||
*/
|
||||
typedef void(*ffrt_function_t)(void*);
|
||||
typedef void(*ffrt_function_ptr_t)(void*);
|
||||
typedef ffrt_coroutine_ret_t(*ffrt_coroutine_ptr_t)(void*);
|
||||
typedef struct {
|
||||
/** Function used to execute a task. */
|
||||
ffrt_function_t exec;
|
||||
|
@ -252,7 +252,7 @@ void ffrt_task_handle_destroy(ffrt_task_handle_t handle)
|
||||
#ifdef FFRT_IO_TASK_SCHEDULER
|
||||
ffrt_executor_task_t* task = (ffrt_executor_task_t*)handle;
|
||||
if (task->type == ffrt_io_task) {
|
||||
ffrt::ffrt_executor_io_task* io_task = (ffrt::ffrt_exxcutor_io_task);
|
||||
ffrt::ffrt_executor_io_task* io_task = (ffrt::ffrt_executor_io_task*)task;
|
||||
io_task->freeMem();
|
||||
return;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include "sync/poller.h"
|
||||
#include "sched/scheduler.h"
|
||||
#include "eu/wgcm.h"
|
||||
#include "eu/execute_unit.h"
|
||||
@ -280,7 +281,7 @@ void CPUMonitor::Poke(const QoS& qos)
|
||||
} else {
|
||||
#ifdef FFRT_IO_TASK_SCHEDULER
|
||||
if (workerCtrl.pollWaitFlag) {
|
||||
PollerProxy::Instance()->GetPoller(qos).Wakeup();
|
||||
PollerProxy::Instance()->GetPoller(qos).WakeUp();
|
||||
}
|
||||
#endif
|
||||
workerCtrl.lock.unlock();
|
||||
|
@ -25,6 +25,7 @@
|
||||
#ifdef FFRT_IO_TASK_SCHEDULER
|
||||
#include "queue/queue.h"
|
||||
#include "c/type_def.h"
|
||||
#include "c/executor_task.h"
|
||||
#endif
|
||||
|
||||
namespace ffrt {
|
||||
|
Loading…
Reference in New Issue
Block a user