|
A small collection of functions from the normal Plan 9 C library
is used in the kernel. Only a subset is made available by declarations
in lib.h, which must be included instead of the usual <libc.h>.
Here is a list of the manual pages, and the functions from them
declared by lib.h for kernel use:
abs(2)
atof(2)
| |
atoi, strtol, strtoul, strtoll, and strtoull
|
cleanname(2)
encode(2)
fmtinstall(2)
| |
Fmt, fmtinstall, fmtprint and fmtstrcpy
|
getbe(2)
| |
getbe, putbe, getle, and putle
|
getcallerpc(2)
getfields(2)
quote(2)
print(2)
| |
print, seprint, snprint, sprint, vseprint and vsnprint,
|
memory(2)
| |
memccpy, memchr, memcmp, memmove and memset
|
rune(2)
| |
chartorune, runetochar, runelen, utflen and utfrune
|
open(2)
| |
values OCEXEC, OEXCL, OEXEC, ORCLOSE, ORDWR, OREAD, OTRUNC and
OWRITE,
|
stat(2)
| |
data structures Dir and Qid, and values DMDIR etc. and QTDIR etc.
|
strcat(2)
| |
strcat, strchr, strcmp, strcpy, strecpy, strlen, strncat, strncmp,
strncpy, strrchr and strstr
|
wait(2)
lib.h also defines ERRMAX (the limit in bytes for error strings)
and KNAMELEN (fixed–length limit in bytes for device driver file
names)
A few other libraries such as memdraw(2) and mp(2) are called
by specialised kernel components and drivers but they use the
normal include file for each library.
|