9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@labs.coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] stupid kernel question
Date: Fri,  1 Oct 2010 16:24:21 -0400	[thread overview]
Message-ID: <acbbbd521c91ac93a1c0f6fbb5eabc52@coraid.com> (raw)
In-Reply-To: <10bf630b13fbac21955790c6827f1ab4@quintile.net>

On Fri Oct  1 15:25:16 EDT 2010, steve@quintile.net 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	other threads:[~2010-10-01 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 19:17 Steve Simon
2010-10-01 20:24 ` erik quanstrom [this message]
2010-10-01 20:25 ` Francisco J Ballesteros
2010-10-01 22:03 ` Steve Simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acbbbd521c91ac93a1c0f6fbb5eabc52@coraid.com \
    --to=quanstro@labs.coraid.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).