You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sue Moon edited this page Apr 1, 2021
·
7 revisions
TCPAssignment::systemCallback method does not have a return value. Those system calls that may not return immediately, such as accept(), need to be blocked until ready. You should store the corresponding UUID to return it later. For all system calls to return a value, you must use a returnSystemCall method.
Note that returning systemCallback without calling returnSystemCall will block the application.
Example
voidTCPAssignment::systemCallback(UUID syscallUUID, int pid,
const SystemCallParameter ¶m) {
this->returnSystemCall(syscallUUID, -ENOSYS); // returns -ENOSYS (Function not implemented) from system call `syscallUUID`
}