pseudocode for syscalls