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

Method WatchMaster

Kernel/src/tty/pty.cpp:242–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void PTY::WatchMaster(FilesystemWatcher& watcher, int events){
243 if(!(events & (POLLIN))){ // We don't really block on writes and nothing else applies except POLLIN
244 watcher.Signal();
245 return;
246 } else if(masterFile.CanRead()){
247 watcher.Signal();
248 return;
249 }
250
251 watchingMaster.add_back(&watcher);
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

Callers 1

WatchMethod · 0.80

Calls 3

SignalMethod · 0.80
CanReadMethod · 0.45
add_backMethod · 0.45

Tested by

no test coverage detected