9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: [9fans] kernel, errfmt
Date: Fri, 25 Jul 2008 12:15:39 +0100	[thread overview]
Message-ID: <c6a62e7956a7feccb4e42c877569d5ae@quintile.net> (raw)

Hi,

I have become confused trying to understand
the kernel's linkage.

the kernel uses print() in many places, e.g.
/sys/src/9/port/xalloc.c:80

/sys/src/9/port/devcons.c:211 This calls vseprint().

/sys/src/libc/fmt/fmt.c:47 The fmt library installs %r
(errfmt) by default.

/sys/src/libc/fmt/errfmt.c:10 references rerrstr().

/sys/src/libc/9sys/rerrstr.c:10 references errstr().

Errstr() is a system call and does not exist in the
kernel (where it becomes syserrstr()).

How can this work? ...or does the kernel itself
perform system calls?

-Steve



             reply	other threads:[~2008-07-25 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 11:15 Steve Simon [this message]
2008-07-25 11:47 erik quanstrom
2008-07-25 12:11 ` Charles Forsyth

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=c6a62e7956a7feccb4e42c877569d5ae@quintile.net \
    --to=steve@quintile.net \
    --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).