Home
last modified time | relevance | path

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

1234

/base/startup/init/services/loopevent/loop/
Dle_loop.c52 static LE_STATUS CreateLoop_(EventLoop **loop, uint32_t maxevents, uint32_t timeout) in CreateLoop_() argument
55 LE_STATUS ret = CreateEpollLoop(loop, maxevents, timeout); in CreateLoop_()
58 (*loop)->maxevents = maxevents; in CreateLoop_()
59 (*loop)->timeout = timeout; in CreateLoop_()
60 (*loop)->stop = 0; in CreateLoop_()
61 LoopMutexInit(&(*loop)->mutex); in CreateLoop_()
71 return OH_HashMapCreate(&(*loop)->taskMap, &info); in CreateLoop_()
74 LE_STATUS CloseLoop(EventLoop *loop) in CloseLoop() argument
76 if (!loop->stop) { in CloseLoop()
79 OH_HashMapDestory(loop->taskMap); in CloseLoop()
[all …]
Dle_epoll.c19 static int IsValid_(const EventEpoll *loop) in IsValid_() argument
21 return loop->epollFd > 0; in IsValid_()
35 static LE_STATUS Close_(const EventLoop *loop) in Close_() argument
37 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in Close_()
38 EventEpoll *epoll = (EventEpoll *)loop; in Close_()
44 static LE_STATUS AddEvent_(const EventLoop *loop, const BaseTask *task, int op) in AddEvent_() argument
47 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in AddEvent_()
48 EventEpoll *epoll = (EventEpoll *)loop; in AddEvent_()
60 static LE_STATUS ModEvent_(const EventLoop *loop, const BaseTask *task, int op) in ModEvent_() argument
63 LE_CHECK(loop != NULL, return LE_FAILURE, "Invalid loop"); in ModEvent_()
[all …]
Dle_loop.h31 LE_STATUS (*close)(const struct EventLoop_ *loop);
32 LE_STATUS (*runLoop)(const struct EventLoop_ *loop);
33 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);
35 LE_STATUS (*delEvent)(const struct EventLoop_ *loop, int fd, int op);
48 LE_STATUS CloseLoop(EventLoop *loop);
49 LE_STATUS AddTask(EventLoop *loop, BaseTask *task);
50 BaseTask *GetTaskByFd(EventLoop *loop, int fd);
51 void DelTask(EventLoop *loop, BaseTask *task);
52 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.cpp68 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
69 loop->StartLoop();
70 eventLogger.BindWorkLoop(loop);
82 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
83 loop->StartLoop();
84 eventLogger.BindWorkLoop(loop);
98 std::shared_ptr<EventLoop> loop = std::make_shared<EventLoop>("eventLoop"); variable
99 loop->StartLoop();
100 eventLogger.BindWorkLoop(loop);
115 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_()
66 EventLoop *loop = (EventLoop *)loopHandle; in LE_StartWatcher() local
67 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_()
151 EventLoop *loop = (EventLoop *)loopHandle; in HandleServerEvent_() local
152 loop->modEvent(loop, (const BaseTask *)serverTask, Event_Read); in HandleServerEvent_()
170 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateStreamServer() local
178 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamServer()
206 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateStreamClient() local
207 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_()
114 EventLoop *loop = (EventLoop *)loopHandle; in LE_CreateAsyncTask() local
115 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateAsyncTask()
/base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/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/request/request/upload/interfaces/kits/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/theme/screenlock_mgr/frameworks/kitsimpl/src/
Duv_queue.cpp21 uv_loop_s *loop = nullptr; in Call() local
22 napi_get_uv_event_loop(env, &loop); in Call()
23 if (loop == nullptr) { in Call()
34 loop, work, [](uv_work_t *work) {}, afterCallback); 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
72 EventLoop *loop = (EventLoop *)loopHandle; in LE_AddSignal() local
83 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
85 loop->modEvent(loop, (const BaseTask *)task, Event_Read); in LE_AddSignal()
94 EventLoop *loop = (EventLoop *)loopHandle; in LE_RemoveSignal() local
105 loop->delEvent(loop, GetSocketFd(signalHandle), Event_Read); in LE_RemoveSignal()
/base/request/request/download/interfaces/kits/js/napi/download_single/src/
Ddownload_base_notify.cpp35 uv_loop_s *loop = nullptr; in ~DownloadBaseNotify() local
36 napi_get_uv_event_loop(notifyData_->env, &loop); in ~DownloadBaseNotify()
37 if (loop == nullptr) { in ~DownloadBaseNotify()
55 loop, work, [](uv_work_t *work) {}, in ~DownloadBaseNotify()
74 uv_loop_s *loop = nullptr; in CallBack() local
75 napi_get_uv_event_loop(notifyData_->env, &loop); in CallBack()
76 if (loop == nullptr) { in CallBack()
93 loop, work, [](uv_work_t *work) {}, in CallBack()
/base/time/time_service/services/time/src/
Dsntp_client.cpp145 for (int loop = offset; loop < offset + _len; loop++) { in GetNtpTimestamp64() local
146 valueRx[numOfBit] = buffer[loop]; in GetNtpTimestamp64()
231 for (int loop = ORIGINATE_TIMESTAMP_OFFSET; loop < offsetEnd; loop++) { in CreateMessage() local
232 buffer[loop] = value[numOfBit]; in CreateMessage()
263 for (int loop = ORIGINATE_TIMESTAMP_OFFSET; loop < offsetEnd; loop++) { in WriteTimeStamp() local
264 buffer[loop] = value[numOfBit]; in WriteTimeStamp()
336 for (int loop = offset; loop < offset + _len; loop++) { in GetNtpField32() local
337 valueRx[numOfBit] = buffer[loop]; in GetNtpField32()
356 for (int loop = offset; loop < offset + _len; loop++) { in GetReferenceId() local
357 _outArray[num] = buffer[loop]; in GetReferenceId()
/base/web/webview/interfaces/kits/napi/webfunction/
Dwebview_web_inited_callback.cpp24 uv_loop_s *loop = nullptr; in RunInitedCallback() local
26 napi_get_uv_event_loop(param_->env_, &loop); in RunInitedCallback()
28 if (loop == nullptr) { in RunInitedCallback()
38 int ret = uv_queue_work(loop, work, [](uv_work_t *work) {}, [](uv_work_t *work, int status) { in RunInitedCallback()
/base/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account_authenticator.cpp72 ErrCode NapiAppAccountAuthenticator::InitWorkEnv(uv_loop_s **loop, uv_work_t **work, JsAuthenticato… in InitWorkEnv() argument
74 napi_get_uv_event_loop(env_, loop); in InitWorkEnv()
75 if (*loop == nullptr) { in InitWorkEnv()
102 uv_loop_s *loop = nullptr; in AddAccountImplicitly() local
105 ErrCode result = InitWorkEnv(&loop, &work, &param); in AddAccountImplicitly()
115 uv_queue_work(loop, work, [](uv_work_t *work) {}, AddAccountImplicitlyWork); in AddAccountImplicitly()
125 uv_loop_s *loop = nullptr; in Authenticate() local
128 ErrCode result = InitWorkEnv(&loop, &work, &param); in Authenticate()
138 uv_queue_work(loop, work, [](uv_work_t *work) {}, AuthenticateWork); in Authenticate()
147 uv_loop_s *loop = nullptr; in CreateAccountImplicitly() local
[all …]
/base/location/frameworks/native/source/
Dlocator_callback_host.cpp97 void LocatorCallbackHost::DoSendWork(uv_loop_s*& loop, uv_work_t*& work) in DoSendWork() argument
99 uv_queue_work(loop, work, [](uv_work_t* work) {}, in DoSendWork()
153 void LocatorCallbackHost::DoSendErrorCode(uv_loop_s *&loop, uv_work_t *&work) in DoSendErrorCode() argument
155 uv_queue_work(loop, work, [](uv_work_t *work) {}, in DoSendErrorCode()
208 uv_loop_s *loop = nullptr; in SendErrorCode() local
209 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in SendErrorCode()
210 if (loop == nullptr) { in SendErrorCode()
230 DoSendErrorCode(loop, work); in SendErrorCode()
237 uv_loop_s *loop = nullptr; in OnLocationReport() local
242 NAPI_CALL_RETURN_VOID(env_, napi_get_uv_event_loop(env_, &loop)); in OnLocationReport()
[all …]
Dgnss_status_callback_host.cpp74 uv_loop_s *loop = nullptr; in Send() local
75 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
76 if (loop == nullptr) { in Send()
94 UvQueueWork(loop, work); in Send()
98 void GnssStatusCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
101 loop, in UvQueueWork()
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()
Dnmea_message_callback_host.cpp81 uv_loop_s *loop = nullptr; in Send() local
82 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
83 if (loop == nullptr) { in Send()
101 UvQueueWork(loop, work); in Send()
106 void NmeaMessageCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
109 loop, in UvQueueWork()
Dcountry_code_callback_host.cpp62 uv_loop_s *loop = nullptr; in Send() local
71 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
72 if (loop == nullptr) { in Send()
90 UvQueueWork(loop, work); in Send()
94 void CountryCodeCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
97 loop, in UvQueueWork()
Dcached_locations_callback_host.cpp77 uv_loop_s *loop = nullptr; in Send() local
78 NAPI_CALL_BASE(env_, napi_get_uv_event_loop(env_, &loop), false); in Send()
79 if (loop == nullptr) { in Send()
97 UvQueueWork(loop, work); in Send()
101 void CachedLocationsCallbackHost::UvQueueWork(uv_loop_s* loop, uv_work_t* work) in UvQueueWork() argument
104 loop, in UvQueueWork()
/base/hiviewdfx/hiappevent/frameworks/js/napi/src/
Dnapi_app_event_watcher.cpp65 uv_loop_t* loop = nullptr; in ~NapiAppEventWatcher() local
66 napi_get_uv_event_loop(context_->env, &loop); in ~NapiAppEventWatcher()
70 loop, in ~NapiAppEventWatcher()
101 uv_loop_t* loop = nullptr; in OnTrigger() local
102 napi_get_uv_event_loop(context_->env, &loop); in OnTrigger()
106 loop, in OnTrigger()
/base/useriam/user_auth_framework/frameworks/js/napi/user_auth/src/
Duser_auth_callback_v8.cpp183 uv_loop_s *loop; in OnAcquireInfo() local
184 napi_status napiStatus = napi_get_uv_event_loop(env_, &loop); in OnAcquireInfo()
185 if (napiStatus != napi_ok || loop == nullptr) { in OnAcquireInfo()
204 if (uv_queue_work(loop, work, [](uv_work_t *work) {}, OnAcquireV8Work) != 0) { in OnAcquireInfo()
213 uv_loop_s *loop; in OnResult() local
214 napi_status napiStatus = napi_get_uv_event_loop(env_, &loop); in OnResult()
215 if (napiStatus != napi_ok || loop == nullptr) { in OnResult()
243 if (uv_queue_work(loop, work, [](uv_work_t *work) {}, OnResultV8Work) != 0) { in OnResult()
/base/telephony/call_manager/frameworks/js/napi/src/
Dnapi_call_ability_callback.cpp263 uv_loop_s *loop = nullptr; in ReportStartRttInfo() local
265 napi_get_uv_event_loop(startRttCallback_.env, &loop); in ReportStartRttInfo()
281 loop, work, [](uv_work_t *work) {}, ReportStartRttInfoWork); in ReportStartRttInfo()
294 uv_loop_s *loop = nullptr; in ReportStopRttInfo() local
296 napi_get_uv_event_loop(stopRttCallback_.env, &loop); in ReportStopRttInfo()
312 loop, work, [](uv_work_t *work) {}, ReportStopRttInfoWork); in ReportStopRttInfo()
325 uv_loop_s *loop = nullptr; in ReportCallMediaModeInfo() local
327 napi_get_uv_event_loop(updateCallMediaModeCallback_.env, &loop); in ReportCallMediaModeInfo()
343 loop, work, [](uv_work_t *work) {}, ReportCallMediaModeInfoWork); in ReportCallMediaModeInfo()
356 uv_loop_s *loop = nullptr; in UpdateCallStateInfo() local
[all …]

1234