I've updated the files in the kernel interface, and added a document which describe how to implement and use the kernel interface. You can look at the changes at http://jos.org/cvsweb.cgi/jos/interfaces/kernel/.
This is the document so far. Please don't make changes to the document on this page, instead checkout a copy of the file from CVS and send me a patch of your changes.
Kernel Interface Introduction Atomic Operation's Data Type's Debugging Interrupt's Input Output Port's Inter Thread Communication Linear Memory Monitor's Thread's Time Timer's Variable Argument's Virtual Memory Debugging kint kdebug_printf(kuint level, kuint8* format, ...); Description: Parameters: Return value: Name Value ---- ----- kdebug_error 0 kdebug_information 1 kdebug_warning 2 kdebug_trace 3 Data Types This interface defines most of the data types and values used throughout the Kernel Interface. Some of these data types have defined sizes set by the interface, and others are platform specific. These data types and values are defined in the 'ktype.h' header file. Note: To allow the 'ktype.h' header file to be shared by all implementations of the interface, the header file includes the 'kernel_type.h' header file from the kernel implementation. It is this file which actually defines all the data types and values. Data types table: Name Size Type ---- ---- ---- kint platform specific signed two's complement integer kint8 8 bits signed two's complement integer kint16 16 bits signed two's complement integer kint32 32 bits signed two's complement integer kint64 64 bits signed two's complement integer kuint platform specific unsigned integer kuint8 8 bits unsigned integer kuint16 16 bits unsigned integer kuint32 32 bits unsigned integer kuint64 64 bits unsigned integer kfloat platfrom specific IEEE 754 floating point number kfloat32 32 bits IEEE 754 floating point number kfloat64 64 bits IEEE 754 floating point number khandle platform specific kernel specific Notes: * The size in bits of a platform specific integer data type is greater than or equal to the size in bits of a pointer on that platform. * The size in bits of a platform specific floating point number data type is greater than or equal to the size in bits of the kfloat64 data type. * The khandle data type is kernel implementation specific. The only operation premitted on this data type outside of the kernel implementation is the printing of it's value for debugging propocess. When it's value is being printed it should be treated as an unsigned integer. There are also three data values defined by this interface, ktrue, kfalse, and knull. Data values table: Name Value ---- ----- ktrue value when an expression elevates as true kfalse value when an expression elevates as false knull value of a null pointer |
-- RobertFitzsimons (30 June 1999)