/commonlibrary/ets_utils/js_concurrent_module/taskpool/ |
H A D | task_runner.cpp | 24 TaskRunner::TaskRunner(TaskStartCallback callback) : callback_(callback), selfThreadId_(uv_thread_self()) {}
in TaskRunner() argument 46 if (LIKELY(callback_.callback != nullptr)) {
in Run() 47 callback_.callback(callback_.data);
in Run() 49 HILOG_FATAL("taskpool:: callback_.callback is null");
in Run()
|
H A D | task_runner.h | 29 : callback(function), data(dataArgs) in TaskStartCallback() 32 CallbackFunction callback; member 49 explicit TaskRunner(TaskStartCallback callback);
|
/commonlibrary/ets_utils/js_concurrent_module/utils/test/ |
H A D | test_locks.cpp | 84 static napi_value CreateFunction(const char *name, napi_value (*callback)(napi_env, napi_callback_info), in CreateFunction() argument 88 napi_status status = napi_create_function(GetEnv(), name, NAPI_AUTO_LENGTH, callback, data, &result); in CreateFunction() 122 napi_value callback = CreateFunction("exclusivelocksingle", ExclusiveLockSingleCb, &isCalled); in TEST_F() local 124 napi_create_reference(env, callback, 1, &callback_ref); in TEST_F() 150 // The callback is executing now by another thread. in ExclusiveLockMultiCb() 170 napi_value callback = CreateFunction("exclusivelockmulti", ExclusiveLockMultiCb, &callbackData); in TEST_F() 172 napi_create_reference(env, callback, 1, &callback_ref); in TEST_F() 179 napi_value callback = CreateFunction("exclusivelockmulti", ExclusiveLockMultiCb, &callbackData); in TEST_F() local 181 napi_create_reference(env, callback, 1, &callback_ref); in TEST_F() 196 napi_value callback in TEST_F() local 273 napi_value callback = CreateFunction("sharedlockmulti", MainSharedLockMultiCb, &callbackData); TEST_F() local 328 napi_value callback = CreateFunction("isavailable", IsAvailableCb, &data); TEST_F() local [all...] |
/commonlibrary/c_utils/base/src/ |
H A D | timer.cpp | 82 uint32_t Timer::Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once) in Register() argument 104 entry->callback = callback; in Register() 156 uint32_t Timer::DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &timerFd) in DoRegister() argument 158 std::function<void(int)> cb = [this, callback](int fd) { this->DoTimerListCallback(callback, fd); }; in DoRegister() 192 /* if stop, callback is forbidden */ in OnTimer() 194 ptr->callback(); in OnTimer() 208 void Timer::DoTimerListCallback(const TimerListCallback& callback, int timerFd) in DoTimerListCallback() argument 210 callback(timerF in DoTimerListCallback() [all...] |
H A D | timer_event_handler.h | 44 void SetTimerCallback(const TimerCallback& callback) { callback_ = callback; } in SetTimerCallback() argument
|
/commonlibrary/ets_utils/js_concurrent_module/worker/ |
H A D | worker_runner.h | 29 : callback(function), data(dataArgs)
in WorkerStartCallback() 32 CallbackFunction callback;
member 49 explicit WorkerRunner(WorkerStartCallback callback);
|
H A D | worker_runner.cpp | 21 WorkerRunner::WorkerRunner(WorkerStartCallback callback) : callback_(callback), selfThreadId_(uv_thread_self()) {}
in WorkerRunner() argument 37 callback_.callback(callback_.data);
in Run()
|
H A D | worker.cpp | 613 napi_ref callback = NapiHelper::CreateReference(env, args[1], 1); in AddListener() local 614 auto listener = new WorkerListener(env, callback, mode); in AddListener() 670 napi_ref callback = nullptr; in RemoveListener() local 672 napi_create_reference(env, args[1], 1, &callback); in RemoveListener() 674 worker->RemoveListenerInner(env, typeStr, callback); in RemoveListener() 676 NapiHelper::DeleteReference(env, callback); in RemoveListener() 682 napi_value callback = nullptr; in CallWorkCallback() local 683 napi_get_named_property(env, recv, type, &callback); in CallWorkCallback() 684 if (NapiHelper::IsCallable(env, callback)) { in CallWorkCallback() 686 napi_call_function(env, recv, callback, arg in CallWorkCallback() 1047 napi_ref callback = NapiHelper::CreateReference(env, args[1], 1); ParentPortAddEventListener() local 1144 napi_ref callback = nullptr; ParentPortRemoveEventListener() local 1418 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onmessage"); HostOnMessageInner() local 1650 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, methodName); CallHostFunction() local 1709 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onerror"); HostOnErrorInner() local 2115 RemoveListenerInner(napi_env env, const char* type, napi_ref callback) RemoveListenerInner() argument 2192 napi_value callback = NapiHelper::GetNamePropertyInParentPort(workerEnv_, workerPort_, methodName); CallWorkerFunction() local 2289 ParentPortRemoveListenerInner(napi_env env, const char* type, napi_ref callback) ParentPortRemoveListenerInner() argument [all...] |
H A D | worker.h | 48 WorkerListener(napi_env env, napi_ref callback, ListenerMode mode) in WorkerListener() 49 : env_(env), callback_(callback), mode_(mode) in WorkerListener() 140 * @param thisVar The callback information of the js layer. 148 * @param thisVar The callback information of the js layer. 156 * @param thisVar The callback information of the js layer. 164 * @param cbinfo The callback information of the js layer. 172 * @param thisVar The callback information of the js layer. 180 * @param thisVar The callback information of the js layer. 188 * @param cbinfo The callback information of the js layer. 196 * @param cbinfo The callback informatio 469 RegisterCallbackForWorkerEnv(std::function<void (napi_env)> callback) RegisterCallbackForWorkerEnv() argument [all...] |
/commonlibrary/c_utils/base/include/ |
H A D | timer.h | 97 * @param callback Indicates the callback function of a timed event. 106 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false); 119 virtual uint32_t DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &timerFd); 121 void DoTimerListCallback(const TimerListCallback& callback, int timerFd); 130 TimerCallback callback; member
|
H A D | safe_map.h | 58 void ChangeValueByLambda(const K& key, LambdaCallback callback) in ChangeValueByLambda() argument 61 callback(map_[key]); in ChangeValueByLambda() 203 * @param callback Called to perform the custom operations on 206 void Iterate(const SafeMapCallBack& callback) in Iterate() argument 211 callback(it -> first, it -> second); in Iterate()
|
/commonlibrary/memory_utils/libpurgeablemem/cpp/include/ |
H A D | purgeable_mem_builder.h | 41 void SetRebuildSuccessCallback(std::function<void()> &callback) in SetRebuildSuccessCallback() argument 43 rebuildSuccessCallback_ = callback; in SetRebuildSuccessCallback()
|
H A D | purgeable_mem_base.h | 115 void SetRebuildSuccessCallback(std::function<void()> &callback);
|
/commonlibrary/rust/ylong_runtime/ylong_ffrt/src/ |
H A D | sys_event.rs | 38 callback: FfrtFdCallBack, in ffrt_poller_register() 49 callback: FfrtExecHook, in ffrt_timer_start()
|
/commonlibrary/ets_utils/js_sys_module/timer/ |
H A D | timer.h | 51 TimerCallbackInfo(napi_env env, uint32_t tId, int32_t timeout, napi_ref callback, in TimerCallbackInfo() 53 : env_(env), tId_(tId), timeout_(timeout), callback_(callback), in TimerCallbackInfo()
|
H A D | timer.cpp | 119 // Save the following parameters to ensure that they can still obtained if callback clears the callbackInfo. in TimerCallback() 132 napi_value callback = Helper::NapiHelper::GetReferenceValue(env, callbackInfo->callback_); in TimerCallback() local 140 napi_call_function(env, undefinedValue, callback, in TimerCallback() 157 // callback maybe contain ClearTimer, so we need check to avoid use-after-free and double-free of callbackInfo in TimerCallback() 186 // 2. get callback args in SetTimeoutInnerCore() 187 size_t callbackArgc = argc >= 2 ? argc - 2 : 0; // 2 include callback and timeout in SetTimeoutInnerCore() 193 Helper::NapiHelper::CreateReference(env, argv[idx + 2], 1); // 2 include callback and timeout in SetTimeoutInnerCore() 196 // 3. generate time callback id in SetTimeoutInnerCore() 197 // 4. generate time callback info in SetTimeoutInnerCore() 198 // 5. push callback inf in SetTimeoutInnerCore() [all...] |
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ffi/ |
H A D | mod.rs | 18 pub(crate) mod callback;
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/ |
H A D | overlapped.rs | 23 pub(crate) callback: fn(&OVERLAPPED_ENTRY, Option<&mut Vec<Event>>),
|
H A D | selector.rs | 159 let callback = (*(iocp_event.overlapped().cast::<super::Overlapped>())).callback; in feed_events() 162 callback(iocp_event.entry(), Some(events)); in feed_events() 295 let callback = in release_events() 296 unsafe { (*(iocp_event.overlapped().cast::<super::Overlapped>())).callback }; in release_events() 298 callback(iocp_event.entry(), None); in release_events()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ |
H A D | mod.rs | 42 pub(crate) use crate::util::c_openssl::ffi::callback::*;
|
/commonlibrary/memory_utils/libpurgeablemem/cpp/src/ |
H A D | purgeable_mem_base.cpp | 236 void PurgeableMemBase::SetRebuildSuccessCallback(std::function<void()> &callback) in SetRebuildSuccessCallback() argument 240 builder_->SetRebuildSuccessCallback(callback); in SetRebuildSuccessCallback()
|
/commonlibrary/c_utils/base/test/benchmarktest/event_benchmark_test/ |
H A D | event_benchmark_test.cpp | 110 // 2. Set callback in SetFdAndCallback() 128 // 2. Set fd and callback in BENCHMARK_F() 172 // 2. Set fd and callback in BENCHMARK_F() 551 * @tc.desc: test removing callback. 695 inline void SetTimerEventCallback(const TimerEventCallback& callback) { timerEventCallback_ = callback; } in SetTimerEventCallback() argument 727 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false); 732 void OnTimer(TimerEventHandler* handler, const TimerCallback& callback); 741 ErrCode ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int& timerFd, 812 ErrCode Timer::ScheduleTimer(const TimerEventCallback& callback, uint32_ argument 839 Register(const TimerCallback& callback, uint32_t interval , bool once) Register() argument 903 OnTimer(TimerEventHandler* handler, const TimerCallback& callback) OnTimer() argument [all...] |
/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_event_test.cpp | 93 // 3. Set callback in HWTEST_F() 136 // 3. Set callback in HWTEST_F() 435 * @tc.desc: test removing callback. 565 inline void SetTimerEventCallback(const TimerEventCallback& callback) { timerEventCallback_ = callback; } in SetTimerEventCallback() argument 596 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false); 601 void OnTimer(TimerEventHandler* handler, const TimerCallback& callback); 610 ErrCode ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int& timerFd, 677 ErrCode Timer::ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, in ScheduleTimer() argument 683 handler->SetTimerEventCallback(callback); in ScheduleTimer() 701 Register(const TimerCallback& callback, uint32_t interval , bool once) Register() argument 765 OnTimer(TimerEventHandler* handler, const TimerCallback& callback) OnTimer() argument [all...] |
/commonlibrary/ets_utils/js_sys_module/timer/test/ |
H A D | test_timer.cpp | 123 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage1); in HWTEST_F() 150 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage1); in HWTEST_F() 168 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage0); in HWTEST_F() 252 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage2); in HWTEST_F() 297 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage1); in HWTEST_F() 319 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage1); in HWTEST_F() 336 napi_ref callback = nullptr; in HWTEST_F() local 340 TimerCallbackInfo* callbackInfo = new TimerCallbackInfo(env, tId, timeout, callback, repeat, argc, argv); in HWTEST_F() 357 napi_create_function(env, "callback", NAPI_AUTO_LENGTH, TimerCallback, nullptr, &nativeMessage1); in HWTEST_F() 389 napi_create_function(env, "callback", NAPI_AUTO_LENGT in HWTEST_F() 436 napi_ref callback = nullptr; HWTEST_F() local [all...] |
/commonlibrary/ets_utils/js_concurrent_module/common/helper/ |
H A D | napi_helper.cpp | 221 napi_ref callback = nullptr; in CreateReference() local 222 napi_create_reference(env, value, refcount, &callback); in CreateReference() 223 return callback; in CreateReference()
|