Hi,

Sorry if this is explained somewhere already. I couldn't find an answer, so here we go.

Considering the `print' function of libc, we see that it calls `vfprint', which in turn calls `fmtFdFlush', which finally calls `write' with 3 parameters.

write(2) says that the source is to be found in /sys/src/libc/ 9syscall, but the mkfile in there defines `_write' which in turn does nothing but push the value 20 on the accumulator and call the interrupt 0x64.

a) Where is `write' actually defined? (Or does `write' simply call `_write'?)
b) Why do some syscalls have `_' prefixes while others do not?
c) How are the parameters to the libc syscall wrapper passed onto the actual kernel-side implementation?

Thank you for your time.

Cheers,
Anant

Reply via email to