MCPcopy Create free account
hub / github.com/apache/brpc / epoll_waiter

Function epoll_waiter

test/bthread_fd_unittest.cpp:409–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void* epoll_waiter(void* arg) {
410#if defined(OS_LINUX)
411 epoll_event e;
412 if (1 == epoll_wait((int)(intptr_t)arg, &e, 1, -1)) {
413 std::cout << e.events << std::endl;
414 }
415#elif defined(OS_MACOSX)
416 struct kevent e;
417 if (1 == kevent((int)(intptr_t)arg, NULL, 0, &e, 1, NULL)) {
418 std::cout << e.flags << std::endl;
419 }
420#endif
421 std::cout << pthread_self() << " quits" << std::endl;
422 return NULL;
423}
424
425TEST(FDTest, interrupt_pthread) {
426#if defined(OS_LINUX)

Callers

nothing calls this directly

Calls 1

keventClass · 0.70

Tested by

no test coverage detected