MCPcopy Create free account
hub / github.com/F-Stack/f-stack / read

Function read

adapter/micro_thread/mt_sys_hook.cpp:176–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176ssize_t read(int fd, void *buf, size_t nbyte)
177{
178 mt_hook_syscall(read);
179 MtHookFd* hook_fd = mt_hook_find_fd(fd);
180 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
181 {
182 return mt_real_func(read)(fd, buf, nbyte);
183 }
184
185 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
186 {
187 return ff_hook_read(fd, buf, nbyte);
188 }
189
190 return MtFrame::read(fd, buf, nbyte, hook_fd->read_timeout);
191}
192
193ssize_t write(int fd, const void *buf, size_t nbyte)
194{

Callers 6

mt_readFunction · 0.70
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_readFunction · 0.70

Tested by

no test coverage detected