On Fri Oct  1 15:25:16 EDT 2010, [email protected] wrote:
> how does kernel code call plan9 system calls, does it perform a
> trap from kernel back into kernel space and make the request just
> like a user process or is there a more direct, subtle route?

the short answer is that it doesn't.  but read/write/open/close/stat
are done via channels, and often with Blocks.  for example
(hopefully without typos)

        c = namec("/sys/src/9/pc/mkfile", Aopen, OREAD, 0);             /* can 
call error */
        b = devtab[c->type]->bread(c, 64*1024, 0);
        /* b->wp points to data if successful BLEN(b) is the length */

- erik

Reply via email to