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

Function bthread_fd_wait

src/bthread/fd.cpp:444–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442extern "C" {
443
444int bthread_fd_wait(int fd, unsigned events) {
445 if (fd < 0) {
446 errno = EINVAL;
447 return -1;
448 }
449 bthread::TaskGroup* g = bthread::tls_task_group;
450 if (NULL != g && !g->is_current_pthread_task()) {
451 return bthread::get_epoll_thread(fd).fd_wait(
452 fd, events, NULL);
453 }
454 return bthread::pthread_fd_wait(fd, events, NULL);
455}
456
457int bthread_fd_timedwait(int fd, unsigned events,
458 const timespec* abstime) {

Callers 8

epoll_threadFunction · 0.85
client_threadFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
ReadOneResponseFunction · 0.85
socket.cppFile · 0.85
bthread_fd_timedwaitFunction · 0.85
fd.cppFile · 0.85

Calls 2

pthread_fd_waitFunction · 0.70

Tested by 5

epoll_threadFunction · 0.68
client_threadFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68
ReadOneResponseFunction · 0.68