Home
last modified time | relevance | path

Searched refs:BaseTask (Results 1 – 14 of 14) sorted by relevance

/base/startup/init/services/loopevent/loop/
Dle_loop.c22 BaseTask *task1 = HASHMAP_ENTRY(node1, BaseTask, hashNode); in TaskNodeCompare()
23 BaseTask *task2 = HASHMAP_ENTRY(node2, BaseTask, hashNode); in TaskNodeCompare()
29 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskKeyCompare()
36 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskGetNodeHasCode()
48 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskNodeFree()
89 BaseTask *task = GetTaskByFd((EventLoop *)loop, fd); in ProcessEvent()
101 LE_STATUS AddTask(EventLoop *loop, BaseTask *task) in AddTask()
114 BaseTask *GetTaskByFd(EventLoop *loop, int fd) in GetTaskByFd()
116 BaseTask *task = NULL; in GetTaskByFd()
121 task = HASHMAP_ENTRY(node, BaseTask, hashNode); in GetTaskByFd()
[all …]
Dle_loop.h33 LE_STATUS (*addEvent)(const struct EventLoop_ *loop, const BaseTask *task, int op);
34 LE_STATUS (*modEvent)(const struct EventLoop_ *loop, const BaseTask *task, int op);
49 LE_STATUS AddTask(EventLoop *loop, BaseTask *task);
50 BaseTask *GetTaskByFd(EventLoop *loop, int fd);
51 void DelTask(EventLoop *loop, BaseTask *task);
Dle_epoll.c46 static LE_STATUS AddEvent_(const EventLoop *loop, const BaseTask *task, int op) in AddEvent_()
62 static LE_STATUS ModEvent_(const EventLoop *loop, const BaseTask *task, int op) in ModEvent_()
/base/startup/init/services/loopevent/task/
Dle_task.c22 int CheckTaskFlags(const BaseTask *task, uint32_t flags) in CheckTaskFlags()
32 BaseTask *stream = (BaseTask *)task; in GetSocketFd()
36 BaseTask *CreateTask(const LoopHandle loopHandle, int fd, const LE_BaseInfo *info, uint32_t size) in CreateTask()
41 BaseTask *task = (BaseTask *)calloc(1, size + info->userDataSize); in CreateTask()
56 void CloseTask(const LoopHandle loopHandle, BaseTask *task) in CloseTask()
137 if (CheckTaskFlags((BaseTask *)task, TASK_STREAM | TASK_CONNECT) || in FreeBuffer()
138 CheckTaskFlags((BaseTask *)task, TASK_EVENT | TASK_ASYNC_EVENT)) { in FreeBuffer()
173 if (((BaseTask *)taskHandle)->flags & TASK_FLAGS_INVALID) { in LE_Send()
179 if (CheckTaskFlags((BaseTask *)taskHandle, TASK_STREAM | TASK_CONNECT)) { in LE_Send()
181 } else if (CheckTaskFlags((BaseTask *)taskHandle, TASK_EVENT | TASK_ASYNC_EVENT)) { in LE_Send()
[all …]
Dle_task.h72 } BaseTask; typedef
75 BaseTask base;
81 BaseTask base;
114 BaseTask base;
127 BaseTask *CreateTask(const LoopHandle loopHandle, int fd, const LE_BaseInfo *info, uint32_t size);
128 void CloseTask(const LoopHandle loopHandle, BaseTask *task);
130 int CheckTaskFlags(const BaseTask *task, uint32_t flags);
Dle_watchtask.c41 loop->modEvent(loop, (const BaseTask *)taskHandle, watcher->events); in HandleWatcherEvent_()
48 CloseTask(loopHandle, (BaseTask *)taskHandle); in HandleWatcherTaskClose_()
49 DelTask((EventLoop *)loopHandle, (BaseTask *)taskHandle); in HandleWatcherTaskClose_()
68 loop->addEvent(loop, (const BaseTask *)task, info->events); in LE_StartWatcher()
Dle_asynctask.c77 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Write); in HandleAsyncEvent_()
83 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Read); in HandleAsyncEvent_()
91 BaseTask *task = (BaseTask *)taskHandle; in HandleAsyncTaskClose_()
116 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateAsyncTask()
Dle_streamtask.c42 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Read); in HandleSendMsg_()
131 BaseTask *task = (BaseTask *)taskHandle; in HandleStreamTaskClose_()
153 loop->modEvent(loop, (const BaseTask *)serverTask, Event_Read); in HandleServerEvent_()
179 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamServer()
208 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamClient()
238 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_AcceptStreamClient()
/base/startup/init/services/loopevent/signal/
Dle_signal.c44 BaseTask *task = (BaseTask *)signalHandle; in HandleSignalTaskClose_()
84 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
86 loop->modEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
Dle_signal.h24 BaseTask base;
/base/startup/init/services/loopevent/timer/
Dle_timer.h24 BaseTask base;
Dle_timer.c68 BaseTask *task = (BaseTask *)taskHandle; in HandleTimerClose_()
107 ret = loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_StartTimer()
/base/startup/init/test/unittest/loopevent/
Dloopsignal_unittest.cpp59 ((BaseTask *)g_sigHandler)->handleEvent(loopClient, (TaskHandle)&g_sigHandler, Event_Write);
Dloopevent_unittest.cpp182 BaseTask *task = CreateTask(LE_GetDefaultLoop(), testfd, &info, sizeof(StreamClientTask)); in ProcessEventTest()