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

Method Read

Kernel/src/tty/pty.cpp:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53ssize_t PTYDevice::Read(size_t offset, size_t size, uint8_t *buffer){
54 assert(pty);
55 assert(device == PTYSlaveDevice || device == PTYMasterDevice);
56
57 if(pty && device == PTYSlaveDevice)
58 return pty->Slave_Read((char*)buffer,size);
59 else if(pty && device == PTYMasterDevice){
60 return pty->Master_Read((char*)buffer,size);
61 } else {
62 assert(!"PTYDevice::Read: PTYDevice is designated neither slave nor master");
63 }
64
65 return 0;
66}
67
68ssize_t PTYDevice::Write(size_t offset, size_t size, uint8_t *buffer){
69 assert(pty);

Callers 2

Master_ReadMethod · 0.45
Slave_ReadMethod · 0.45

Calls 2

Slave_ReadMethod · 0.80
Master_ReadMethod · 0.80

Tested by

no test coverage detected