The Kernel Kit: Miscellaneous Functions and Constants


Miscellaneous Functions


clear_caches()

Declared in: be/kernel/image.h


      void clear_caches(void *addr, size_t len, uint32 flags)

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:

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()

Declared in: be/kernel/OS.h


      void debugger(const char *string)

Throws the calling thread into the debugger. The string argument becomes the debugger's first utterance.


Constants


B_INFINITE_TIMEOUT

Declared in: be/kernel/OS.h

#define B_INFINITE_TIMEOUT (9223372036854775807LL);

The inifinite timeout value can be used to specify, to timeout-accepting functions, that you're willing to wait forever.


B_OS_NAME_LENGTH

Declared in: be/kernel/OS.h

#define B_OS_NAME_LENGTH 32;

This constant gives the maximum length of the name of a thread, semaphore, port, area, or other operating system bauble.


B_PAGE_SIZE

Declared in: be/kernel/OS.h

#define B_PAGE_SIZE 4096;

The B_PAGE_SIZE constant gives the size, in bytes, of a page of RAM.




The Be Book, in lovely HTML, for the BeOS Preview Release.

Copyright © 1997 Be, Inc. All rights reserved.

Be is a registered trademark; BeOS, BeBox, BeWare, GeekPort, the Be logo, and the BeOS logo are trademarks of Be, Inc.

Last modified July 10, 1997.