# The Kernel Kit

The Kernel Kit is a collection of C functions that let you define and control the contexts in which your application operates. There are five main topics in the Kit:

- The Kernel Kit: Threads and Teams. A thread is a synchronous computer process. By creating multiple threads, you can make your application perform different tasks at (virtually) the same time. A team is the collection of threads that your application creates.

- The Kernel Kit: Ports. A port can be thought of as a mailbox for threads: A thread can write a message to a port, and some other thread (or, less usefully, the same thread) can then retrieve the message.

- The Kernel Kit: Semaphores. A semaphore is a system-wide counting variable that can be used as a lock that protects a piece of code. Before a thread is allowed to execute the code, it must acquire the semaphore that guards it. Semaphores can also be used to synchronize the execution of two or more threads.

- The Kernel Kit: Areas. The area functions let you allocate large chunks of virtual memory. The two primary features of areas are: They can be locked into the CPU's on-chip memory, and the data they hold can be shared between applications.

- The Kernel Kit: Images. An image is compiled code that can be dynamically linked into a running application. By loading and unloading images you can make run-time decisions about the resources that your application has access to. Images are of particular interest to driver designers.

The rest of this chapter describes these topics in detail. The final two sections...

- The Kernel Kit: System and Time Information and

- The Kernel Kit: Miscellaneous Functions and Constants

...fill in the gaps.

|  | The Kernel Kit also includes some straight C file system functions (declared in the fs_*.h header files. These functions are described in Chapter 3, The Storage Kit.

The Kernel Kit:

# The Kernel Kit:

The Be Book, in lovely HTML, for BeOS Release 3.

Copyright © 1998 Be, Inc. All rights reserved.

Last modified March 26, 1998.