MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / WatchSlave

Method WatchSlave

Kernel/src/tty/pty.cpp:254–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void PTY::WatchSlave(FilesystemWatcher& watcher, int events){
255 if(!(events & (POLLIN))){ // We don't really block on writes and nothing else applies except POLLIN
256 watcher.Signal();
257 return;
258 } else if(slaveFile.CanRead()){
259 watcher.Signal();
260 return;
261 }
262
263 watchingSlave.add_back(&watcher);
264}
265
266void PTY::UnwatchMaster(FilesystemWatcher& watcher){
267 watchingMaster.remove(&watcher);

Callers 1

WatchMethod · 0.80

Calls 3

SignalMethod · 0.80
CanReadMethod · 0.45
add_backMethod · 0.45

Tested by

no test coverage detected