Home
last modified time | relevance | path

Searched refs:reactor (Results 1 – 11 of 11) sorted by relevance

/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/linux/
H A Dreactor_linux.c40 Reactor *reactor; member
64 reactor->epollFd = -1; in ReactorCreate()
65 reactor->stopFd = -1; in ReactorCreate()
99 return reactor; in ReactorCreate()
102 ReactorDelete(reactor); in ReactorCreate()
108 if (reactor == NULL) { in ReactorDelete()
116 free(reactor); in ReactorDelete()
121 ASSERT(reactor); in ReactorStart()
177 ASSERT(reactor); in ReactorStop()
184 ASSERT(reactor); in ReactorRegister()
[all …]
H A Dthread_linux.c38 Reactor *reactor; member
73 ReactorSetThreadId(thread->reactor, (unsigned long)pthread_self()); in ThreadStartFunc()
78 …ReactorItem *reactorItem = ReactorRegister(thread->reactor, fd, (void *)thread->taskQueue, ReadyTo… in ThreadStartFunc()
81 if (ReactorStart(thread->reactor) != 0) { in ThreadStartFunc()
116 ReactorStop(thread->reactor); in ThreadStop()
130 thread->reactor = ReactorCreate(); in ThreadCreate()
131 if (thread->reactor == NULL) { in ThreadCreate()
169 ReactorDelete(thread->reactor); in ThreadCreate()
186 ReactorDelete(thread->reactor); in ThreadDelete()
208 return thread->reactor; in ThreadGetReactor()
/ohos5.0/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_event_test.cpp321 reactor->Run(-1); in InitAndRun()
342 reactor->EnableHandling();
356 reactor->Terminate();
385 reactor->EnableHandling();
395 reactor->Terminate();
422 reactor->EnableHandling();
429 reactor->Terminate();
456 reactor->EnableHandling();
466 reactor->Terminate();
503 reactor->Terminate();
[all …]
/ohos5.0/commonlibrary/c_utils/base/test/benchmarktest/event_benchmark_test/
H A Devent_benchmark_test.cpp434 reactor->EnableHandling(); in BENCHMARK_F()
453 reactor->Terminate(); in BENCHMARK_F()
481 reactor->Run(INVALID_FD); in EventLoop()
484 return reactor; in EventLoop()
504 reactor->EnableHandling(); in BENCHMARK_F()
514 reactor->Terminate(); in BENCHMARK_F()
535 reactor->EnableHandling(); in BENCHMARK_F()
543 reactor->Terminate(); in BENCHMARK_F()
574 reactor->Terminate(); in BENCHMARK_F()
622 reactor->Terminate(); in BENCHMARK_F()
[all …]
/ohos5.0/commonlibrary/c_utils/base/src/
H A Dio_event_handler.cpp45 bool IOEventHandler::Start(IOEventReactor* reactor) in Start() argument
48 __FUNCTION__, reinterpret_cast<void*>(this), reinterpret_cast<void*>(reactor)); in Start()
49 ErrCode res = reactor->AddHandler(this); in Start()
58 bool IOEventHandler::Stop(IOEventReactor* reactor) in Stop() argument
61 __FUNCTION__, reinterpret_cast<void*>(this), reinterpret_cast<void*>(reactor)); in Stop()
62 ErrCode res = reactor->RemoveHandler(this); in Stop()
71 bool IOEventHandler::Update(IOEventReactor* reactor) in Update() argument
74 __FUNCTION__, reinterpret_cast<void*>(this), reinterpret_cast<void*>(reactor)); in Update()
75 ErrCode res = reactor->UpdateHandler(this); in Update()
/ohos5.0/commonlibrary/c_utils/docs/zh-cn/
H A Dc_utils_guide_event.md151 | bool | **Start**(IOEventReactor * reactor)<br>启动当前事件监听。 |
152 | bool | **Stop**(IOEventReactor * reactor)<br>停止当前事件监听 |
188 | bool | **Start**(IOEventReactor * reactor)<br>启动当前事件监听。 |
189 | bool | **Stop**(IOEventReactor * reactor)<br>停止当前事件监听 |
221 ASSERT_EQ(reactor->SetUp(), EVENT_SYS_ERR_OK);
222 reactor->EnableHandling();
228 handler->Start(reactor.get());
231 std::thread loopThread([&reactor]{
232 reactor->Run(-1);
242 reactor->Terminate();
[all …]
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/include/
H A Dreactor.h47 void ReactorDelete(Reactor *reactor);
56 int32_t ReactorStart(Reactor *reactor);
64 void ReactorStop(const Reactor *reactor);
73 void ReactorSetThreadId(Reactor *reactor, unsigned long threadId);
86 ReactorItem *ReactorRegister(Reactor *reactor, int32_t fd, void *context, void (*onReadReady)(void …
/ohos5.0/commonlibrary/c_utils/base/include/
H A Dio_event_handler.h36 bool Start(IOEventReactor* reactor);
37 bool Stop(IOEventReactor* reactor);
38 bool Update(IOEventReactor* reactor);
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/src/hci/
H A Dhci.c80 Reactor *reactor = ThreadGetReactor(g_hciTxThread); in HciInitQueue() local
82 … ReactorRegister(reactor, QueueGetDequeueFd(g_hciTxQueue), NULL, HciSendPacketCallback, NULL); in HciInitQueue()
89 Reactor *reactor = ThreadGetReactor(BTM_GetProcessingThread()); in HciInitQueue() local
91 … ReactorRegister(reactor, QueueGetDequeueFd(g_hciRxQueue), NULL, HciRecvPacketCallback, NULL); in HciInitQueue()
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/src/btm/
H A Dbtm_thread.c76 Reactor *reactor = ThreadGetReactor(g_processingThread); in AllocProcessingQueue() local
77 …block->reactorItem = ReactorRegister(reactor, QueueGetDequeueFd(block->queue), block->queue, RunTa… in AllocProcessingQueue()
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/
H A DBUILD.gn31 "platform/src/reactor.c",