9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: Subject: [9fans] Subject: How Subject: do Subject: 9syscalls Subject: work?
@ 2008-01-25 10:41 gdiaz
  0 siblings, 0 replies; only message in thread
From: gdiaz @ 2008-01-25 10:41 UTC (permalink / raw)
  To: 9fans

Hola,

could it be that some of those syscalls are the non-portable version optimized for a specific platform?

slds.

gabi


-- anant@kix.in wrote: 
>
>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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-25 10:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-25 10:41 Subject: [9fans] Subject: How Subject: do Subject: 9syscalls Subject: work? gdiaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).