* [9fans] kernel, errfmt
@ 2008-07-25 11:15 Steve Simon
0 siblings, 0 replies; 3+ messages in thread
From: Steve Simon @ 2008-07-25 11:15 UTC (permalink / raw)
To: 9fans
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] kernel, errfmt
@ 2008-07-25 11:47 erik quanstrom
2008-07-25 12:11 ` Charles Forsyth
0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2008-07-25 11:47 UTC (permalink / raw)
To: steve, 9fans
> 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?
i believe /sys/src/libc/9syscall generates entry points.
there are text symbols in libc.a for the symbols you
mention.
however, using %r might be a problem. the kernel
should likely have a stub
int
errfmt(Fmt *f)
{
return fmtstrcpy(f, up->errstr);
}
- erik
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-25 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-25 11:15 [9fans] kernel, errfmt Steve Simon
2008-07-25 11:47 erik quanstrom
2008-07-25 12:11 ` Charles Forsyth
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).