The Kernel Kit: Miscellaneous Functions and Constants
| The Kernel Kit Table of Contents | The Kernel Kit Index |
Miscellaneous Functions and Constants
Declared in: be/kernel/OS.h (unless otherwise noted)
Functions
clear_caches()
Declared in: be/kernel/image.h
|
This function clears or invalidates the instruction and data caches. You should only need this function if you're generating code on the fly, or if you're performing a timing loop and you want to start with fresh caches (to get a "worst case" estimate).
The argument are:
- addr is the starting address of a section of memory that corresponds to a section of one of the caches.
- len is the length, in bytes, of the instruction or data segment that you want to clear or invalidate.
- flags is one or both of B_INVALIDATE_ICACHE and B_FLUSH_DCACHE.
By invalidating a section of the instruction cache, you cause the instructions in that section to be reloaded next time they're needed. Flushing the data cache causes the in-memory copy of the data to be written out to the cache.
debugger()
|
Throws the calling thread into the debugger. The string argument becomes the debugger's first utterance.
disable_debugger()
|
Instructs the kernel to send a signal for all exceptions, even those that don't normally trigger the debugger. If the application doesn't have a handler installed for the exception, the team dies without triggering the debugger. state should be nonzero to turn on this functionality or 0 to turn it off.
set_alarm()
|
Tells the kernel to send the SIGALRM signal at some point in the future, as defined by the arguments. When the signal is sent, the SIGALRM handler is invoked (you set the signal handler through the normal means,
set_signal_stack()
Declared in: posix/signal.be.h
|
Sets the location and size of the stack that's used by the thread's signal handlers.
Constants
B_INFINITE_TIMEOUT
| B_INFINITE_TIMEOUT |
The inifinite timeout value can be used to specify, to timeout-accepting functions, that you're willing to wait forever.
B_OS_NAME_LENGTH
| B_OS_NAME_LENGTH |
This constant gives the maximum length of the name of a thread, semaphore, port, area, or other operating system bauble.
B_PAGE_SIZE
| B_PAGE_SIZE |
The B_PAGE_SIZE constant gives the size, in bytes, of a page of RAM.
| The Kernel Kit Table of Contents | The Kernel Kit Index |
...in lovely HTML...
for BeOS Release 4.5.
Copyright © 1999 Be, Inc. All rights reserved.
Text last modified