MCPcopy Create free account
hub / github.com/XpuOS/xsched / Stop

Method Stop

utils/src/waitpid.cpp:71–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void PidFdWaiter::Stop()
72{
73 if (thread_ != nullptr) {
74 XASSERT(!eventfd_write(event_fd_, 1), "fail to write event fd");
75 thread_->join();
76 thread_ = nullptr;
77 }
78
79 if (event_fd_ >= 0) close(event_fd_);
80 if (epoll_fd_ >= 0) close(epoll_fd_);
81 for (auto& it : pid_fds_) { close(it.second); }
82
83 event_fd_ = -1;
84 epoll_fd_ = -1;
85 pid_fds_.clear();
86}
87
88void PidFdWaiter::AddWait(PID pid)
89{

Callers 4

~PidFdWaiterMethod · 0.95
~ScanPidWaiterMethod · 0.45
~INotifyPidWaiterMethod · 0.45
~WinPidWaiterMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected