Home
last modified time | relevance | path

Searched refs:loop (Results 1 – 25 of 117) sorted by relevance

12345

/base/startup/init/services/loopevent/loop/
Dle_loop.c53 static LE_STATUS CreateLoop_(EventLoop **loop, uint32_t maxevents, uint32_t timeout) in CreateLoop_() argument
56 LE_STATUS ret = CreateEpollLoop(loop, maxevents, timeout); in CreateLoop_()
59 (*loop)->maxevents = maxevents; in CreateLoop_()
60 (*loop)->timeout = timeout; in CreateLoop_()
61 (*loop)->stop = 0; in CreateLoop_()
62 LoopMutexInit(&(*loop)->mutex); in CreateLoop_()
64 OH_ListInit(&((*loop)->idleList)); in CreateLoop_()
74 return OH_HashMapCreate(&(*loop)->taskMap, &info); in CreateLoop_()
77 LE_STATUS CloseLoop(EventLoop *loop) in CloseLoop() argument
79 if (!loop->stop) { in CloseLoop()
[all …]
Dle_epoll.c21 static int IsValid_(const EventEpoll *loop) in IsValid_() argument
23 return loop->epollFd >= 0; in IsValid_()
37 static LE_STATUS Close_(const EventLoop *loop) in Close_() argument
39 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in Close_()
40 EventEpoll *epoll = (EventEpoll *)loop; in Close_()
47 static LE_STATUS AddEvent_(const EventLoop *loop, const BaseTask *task, int op) in AddEvent_() argument
50 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in AddEvent_()
51 EventEpoll *epoll = (EventEpoll *)loop; in AddEvent_()
63 static LE_STATUS ModEvent_(const EventLoop *loop, const BaseTask *task, int op) in ModEvent_() argument
66 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in ModEvent_()
[all …]
Dle_loop.h32 LE_STATUS (*close)(const struct EventLoop_ *loop);
33 LE_STATUS (*runLoop)(const struct EventLoop_ *loop);
34 LE_STATUS (*addEvent)(const struct EventLoop_ *loop, const BaseTask *task, int op);
35 LE_STATUS (*modEvent)(const struct EventLoop_ *loop, const BaseTask *task, int op);
36 LE_STATUS (*delEvent)(const struct EventLoop_ *loop, int fd, int op);
51 LE_STATUS CloseLoop(EventLoop *loop);
52 LE_STATUS AddTask(EventLoop *loop, BaseTask *task);
53 BaseTask *GetTaskByFd(EventLoop *loop, int fd);
54 void DelTask(EventLoop *loop, BaseTask *task);
55 LE_STATUS ProcessEvent(const EventLoop *loop, int fd, uint32_t oper);
Dle_epoll.h23 EventLoop loop; member
28 LE_STATUS CreateEpollLoop(EventLoop **loop, uint32_t maxevents, uint32_t timeout);
/base/hiviewdfx/hiview/plugins/eventlogger/test/unittest/common/
Devent_logger_plugin_test.cpp67 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
68 loop->StartLoop();
69 eventLogger.BindWorkLoop(loop);
81 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
82 loop->StartLoop();
83 eventLogger.BindWorkLoop(loop);
97 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
98 loop->StartLoop();
99 eventLogger.BindWorkLoop(loop);
114 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
[all …]
/base/startup/init/services/loopevent/task/
Dle_watchtask.c21 EventLoop *loop = (EventLoop *)loopHandle; in HandleWatcherEvent_() local
32 loop->delEvent(loop, fd, watcher->events); in HandleWatcherEvent_()
36 loop->delEvent(loop, fd, watcher->events); in HandleWatcherEvent_()
41 loop->modEvent(loop, (const BaseTask *)taskHandle, watcher->events); in HandleWatcherEvent_()
67 EventLoop *loop = (EventLoop *)loopHandle; in LE_StartWatcher() local
68 loop->addEvent(loop, (const BaseTask *)task, info->events); in LE_StartWatcher()
Dle_streamtask.c27 EventLoop *loop = (EventLoop *)loopHandle; in HandleSendMsg_() local
42 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Read); in HandleSendMsg_()
84 EventLoop *loop = (EventLoop *)loopHandle; in HandleStreamEvent_() local
96 loop->delEvent(loop, GetSocketFd(handle), Event_Read | Event_Write); in HandleStreamEvent_()
152 EventLoop *loop = (EventLoop *)loopHandle; in HandleServerEvent_() local
153 loop->modEvent(loop, (const BaseTask *)serverTask, Event_Read); in HandleServerEvent_()
175 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateStreamServer() local
183 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamServer()
211 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateStreamClient() local
212 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamClient()
[all …]
Dle_asynctask.c69 EventLoop *loop = (EventLoop *)loopHandle; in HandleAsyncEvent_() local
77 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Write); in HandleAsyncEvent_()
83 loop->modEvent(loop, (const BaseTask *)taskHandle, Event_Read); in HandleAsyncEvent_()
115 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateAsyncTask() local
116 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateAsyncTask()
/base/print/print_fwk/frameworks/kits/extension/src/
Djs_print_callback.cpp41 uv_loop_s* loop = nullptr; in GetJsLoop() local
42 napi_get_uv_event_loop(env, &loop); in GetJsLoop()
43 if (loop == nullptr) { in GetJsLoop()
46 return loop; in GetJsLoop()
51 uv_loop_s *loop = nullptr; in Call() local
52 napi_get_uv_event_loop(env, &loop); in Call()
53 if (loop == nullptr) { in Call()
62 loop, work, [](uv_work_t *work) {}, afterCallback, uv_qos_user_initiated); in Call()
107 uv_loop_s *loop = GetJsLoop(jsRuntime_); in Exec() local
108 if (loop == nullptr) { in Exec()
[all …]
/base/theme/screenlock_mgr/frameworks/js/napi/src/
Duv_queue.cpp22 uv_loop_s *loop = nullptr; in Call() local
23 napi_get_uv_event_loop(env, &loop); in Call()
24 if (loop == nullptr) { in Call()
37 loop, work, [](uv_work_t *work) {}, afterCallback, uv_qos_user_initiated); in Call()
/base/theme/wallpaper_mgr/frameworks/native/src/
Duv_queue.cpp23 uv_loop_s *loop = nullptr; in Call() local
24 napi_get_uv_event_loop(env, &loop); in Call()
25 if (loop == nullptr) { in Call()
35 loop, work, [](uv_work_t *work) {}, afterCallback, uv_qos_user_initiated); in Call()
/base/startup/init/services/loopevent/signal/
Dle_signal.c27 static LE_STATUS HandleSignalEvent_(const LoopHandle loop, const TaskHandle task, uint32_t oper) in HandleSignalEvent_() argument
73 EventLoop *loop = (EventLoop *)loopHandle; in LE_AddSignal() local
84 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
86 loop->modEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
95 EventLoop *loop = (EventLoop *)loopHandle; in LE_RemoveSignal() local
106 loop->delEvent(loop, GetSocketFd(signalHandle), Event_Read); in LE_RemoveSignal()
/base/time/time_service/services/time/src/
Dsntp_client.cpp140 for (int loop = offset; loop < offset + _len; loop++) { in GetNtpTimestamp64() local
141 valueRx[numOfBit] = buffer[loop]; in GetNtpTimestamp64()
229 for (int loop = ORIGINATE_TIMESTAMP_OFFSET; loop < offsetEnd; loop++) { in CreateMessage() local
230 buffer[loop] = value[numOfBit]; in CreateMessage()
261 for (int loop = ORIGINATE_TIMESTAMP_OFFSET; loop < offsetEnd; loop++) { in WriteTimeStamp() local
262 buffer[loop] = value[numOfBit]; in WriteTimeStamp()
332 for (int loop = offset; loop < offset + _len; loop++) { in GetNtpField32() local
333 valueRx[numOfBit] = buffer[loop]; in GetNtpField32()
352 for (int loop = offset; loop < offset + _len; loop++) { in GetReferenceId() local
353 _outArray[num] = buffer[loop]; in GetReferenceId()
/base/request/request/frameworks/js/napi/src/
Duv_queue.cpp20 uv_loop_s *loop = nullptr; in Call() local
21 napi_get_uv_event_loop(env, &loop); in Call()
22 if (loop == nullptr) { in Call()
31 loop, work, [](uv_work_t *work) {}, afterCallback); in Call()
/base/startup/init/services/loopevent/idle/
Dle_idle.c44 task->loop = (EventLoop *)loopHandle; in LE_AddIdle()
53 OH_ListAddTail(&(task->loop->idleList), &(task->node)); in LE_AddIdle()
111 EventLoop *loop = (EventLoop *)loopHandle; in LE_RunIdle() local
113 OH_ListTraversal(&(loop->idleList), NULL, IdleListTraversalProc, 0); in LE_RunIdle()
/base/security/access_token/interfaces/kits/accesstoken/napi/src/
Dnapi_context_common.cpp38 uv_loop_s *loop = nullptr; in ~AtManagerAsyncWorkData() local
39 napi_get_uv_event_loop(env, &loop); in ~AtManagerAsyncWorkData()
40 if ((loop == nullptr) || (workPtr == nullptr) || (workDataRel == nullptr)) { in ~AtManagerAsyncWorkData()
48 NAPI_CALL_RETURN_VOID(env, uv_queue_work_with_qos(loop, workPtr.get(), [] (uv_work_t *work) {}, in ~AtManagerAsyncWorkData()
/base/web/webview/interfaces/kits/napi/webfunction/
Dwebview_web_inited_callback.cpp59 uv_loop_s *loop = nullptr; in RunInitedCallback() local
61 napi_get_uv_event_loop(param_->env_, &loop); in RunInitedCallback()
63 if (loop == nullptr) { in RunInitedCallback()
74 loop, work, [](uv_work_t* work) {}, UvWebInitedCallbackThreadWoker, uv_qos_user_initiated); in RunInitedCallback()
/base/location/frameworks/native/source/
Dlocator_callback_host.cpp98 void LocatorCallbackHost::DoSendWork(uv_loop_s*& loop, uv_work_t*& work) in DoSendWork() argument
100 uv_queue_work(loop, work, [](uv_work_t* work) {}, [](uv_work_t* work, int status) { in DoSendWork()
147 void LocatorCallbackHost::DoSendErrorCode(uv_loop_s *&loop, uv_work_t *&work) in DoSendErrorCode() argument
149 uv_queue_work(loop, work, [](uv_work_t *work) {}, in DoSendErrorCode()
202 uv_loop_s *loop = nullptr; in SendErrorCode() local
203 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in SendErrorCode()
204 if (loop == nullptr) { in SendErrorCode()
224 DoSendErrorCode(loop, work); in SendErrorCode()
231 uv_loop_s *loop = nullptr; in OnLocationReport() local
236 NAPI_CALL_RETURN_VOID(env_, napi_get_uv_event_loop(env_, &loop)); in OnLocationReport()
[all …]
Dlocation_switch_callback_host.cpp75 uv_loop_s *loop = nullptr; in Send() local
76 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
77 if (loop == nullptr) { in Send()
95 UvQueueWork(loop, work); in Send()
99 void LocationSwitchCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
102 loop, in UvQueueWork()
Dgnss_status_callback_host.cpp73 uv_loop_s *loop = nullptr; in Send() local
74 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
75 if (loop == nullptr) { in Send()
93 UvQueueWork(loop, work); in Send()
97 void GnssStatusCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
100 loop, in UvQueueWork()
/base/notification/distributed_notification_service/frameworks/js/napi/src/
Dsubscribe.cpp217 uv_loop_s *loop = nullptr; in OnCanceled() local
218 napi_get_uv_event_loop(canceCallbackInfo_.env, &loop); in OnCanceled()
219 if (loop == nullptr) { in OnCanceled()
246 int ret = uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, in OnCanceled()
319 uv_loop_s *loop = nullptr; in OnBatchCanceled() local
320 napi_get_uv_event_loop(batchCancelCallbackInfo_.env, &loop); in OnBatchCanceled()
321 if (loop == nullptr) { in OnBatchCanceled()
343 int ret = uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, in OnBatchCanceled()
421 uv_loop_s *loop = nullptr; in OnConsumed() local
422 napi_get_uv_event_loop(consumeCallbackInfo_.env, &loop); in OnConsumed()
[all …]
/base/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account_authenticator.cpp89 ErrCode NapiAppAccountAuthenticator::InitWorkEnv(uv_loop_s **loop, uv_work_t **work, JsAuthenticato… in InitWorkEnv() argument
91 napi_get_uv_event_loop(env_, loop); in InitWorkEnv()
92 if (*loop == nullptr) { in InitWorkEnv()
119 uv_loop_s *loop = nullptr; in AddAccountImplicitly() local
122 ErrCode result = InitWorkEnv(&loop, &work, &param); in AddAccountImplicitly()
132 …int32_t ret = uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, AddAccountImplicitlyWork,… in AddAccountImplicitly()
147 uv_loop_s *loop = nullptr; in Authenticate() local
150 ErrCode result = InitWorkEnv(&loop, &work, &param); in Authenticate()
160 …int32_t ret = uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, AuthenticateWork, uv_qos_… in Authenticate()
175 uv_loop_s *loop = nullptr; in CreateAccountImplicitly() local
[all …]
/base/telephony/call_manager/frameworks/js/napi/src/
Dnapi_call_ability_callback.cpp369 uv_loop_s *loop = nullptr; in ReportStartRttInfo() local
371 napi_get_uv_event_loop(startRttCallback_.env, &loop); in ReportStartRttInfo()
386 …uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, ReportStartRttInfoWork, uv_qos_default); in ReportStartRttInfo()
399 uv_loop_s *loop = nullptr; in ReportStopRttInfo() local
401 napi_get_uv_event_loop(stopRttCallback_.env, &loop); in ReportStopRttInfo()
416 … uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, ReportStopRttInfoWork, uv_qos_default); in ReportStopRttInfo()
429 uv_loop_s *loop = nullptr; in UpdateCallStateInfo() local
431 napi_get_uv_event_loop(stateCallback_.env, &loop); in UpdateCallStateInfo()
446 uv_queue_work_with_qos(loop, work, [](uv_work_t *work) {}, ReportCallStateWork, uv_qos_default); in UpdateCallStateInfo()
539 uv_loop_s *loop = nullptr; in UpdateCallEvent() local
[all …]
/base/security/access_token/interfaces/kits/privacy/napi/src/
Dnapi_context_common.cpp80 uv_loop_s* loop = nullptr; in DeleteNapiRef() local
81 NAPI_CALL_RETURN_VOID(env_, napi_get_uv_event_loop(env_, &loop)); in DeleteNapiRef()
82 if (loop == nullptr) { in DeleteNapiRef()
105 … uv_queue_work_with_qos(loop, work, [](uv_work_t* work) {}, UvQueueWorkDeleteRef, uv_qos_default)); in DeleteNapiRef()
123 uv_loop_s* loop = nullptr; in ActiveStatusChangeCallback() local
124 NAPI_CALL_RETURN_VOID(env_, napi_get_uv_event_loop(env_, &loop)); in ActiveStatusChangeCallback()
125 if (loop == nullptr) { in ActiveStatusChangeCallback()
150 …uv_queue_work_with_qos(loop, work, [](uv_work_t* work) {}, UvQueueWorkActiveStatusChange, uv_qos_d… in ActiveStatusChangeCallback()
/base/inputmethod/imf/frameworks/js/napi/common/
Djs_callback_object.cpp40 uv_loop_s *loop = nullptr; in ~JSCallbackObject() local
41 napi_get_uv_event_loop(env_, &loop); in ~JSCallbackObject()
43 loop, work.get(), [](uv_work_t *work) {}, in ~JSCallbackObject()

12345