ipc and lib
The smallest directories (in size) in the Linux source tree are
ipc and lib. The former is
an implementation of the System V interprocess communication
primitives, namely semaphores, message queues, and shared memory; they
often get forgotten, but many applications use them (especially shared
memory). The latter directory includes generic support functions,
similar to the ones available in the standard C library.
The generic library functions are a very small subset of those
available in user space, but cover the indispensable things you
generally need to write code: string functions (including
simple_atol to convert a string to a
long integer with error checking) and
<ctype.h> functions. The most important file
in this directory is vsprintf.c; it implements
the function by the same name, which sits at the core of
sprintf and printk. Another
important file is inflate.c, which includes the
decompressing code of gzip.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access