Kernel Info Page handling functions


Defines

#define l4sigma0_kip_for_each_feature(s)   for (s += strlen(s) + 1; *s; s += strlen(s) + 1)
 Cycle through kernel features given in the KIP.

Cycles through all KIP kernel feature strings. s must be a character pointer (char *) initialized with l4sigma0_kip_version_string().


Functions

L4_CV l4_kernel_info_t * l4sigma0_kip (void)
 Return the address of the kernel info page.
L4_CV int l4sigma0_kip_map_to (l4_threadid_t pager, void *addr)
 Map the kernel info page from pager to addr.
L4_CV l4_kernel_info_t * l4sigma0_kip_map (l4_threadid_t pager)
 Map the kernel info page.

Maps the kernel info page to a library private address.

L4_CV void l4sigma0_kip_unmap (void)
 Unmap the kernel info page.

Unmaps the kernel info page from the library private address.

L4_CV l4_umword_t l4sigma0_kip_version (void)
 Get the kernel version.

Returns the kernel version. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

L4_CV const char * l4sigma0_kip_version_string (void)
 Get the kernel version string.

Returns the kernel version banner string. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

L4_CV int l4sigma0_kip_kernel_is_ux (void)
 Return whether the kernel is running native or under UX.

Returns whether the kernel is running natively or under UX. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

L4_CV int l4sigma0_kip_kernel_has_feature (const char *str)
 Check if kernel supports a feature.
L4_CV unsigned long l4sigma0_kip_kernel_abi_version (void)
 Return kernel ABI version.

Detailed Description

This group of functions should be moved to l4sys!

Define Documentation

#define l4sigma0_kip_for_each_feature (  )     for (s += strlen(s) + 1; *s; s += strlen(s) + 1)

Cycle through kernel features given in the KIP.

Cycles through all KIP kernel feature strings. s must be a character pointer (char *) initialized with l4sigma0_kip_version_string().

Definition at line 117 of file kip.h.


Function Documentation

L4_CV l4_kernel_info_t* l4sigma0_kip ( void   ) 

Return the address of the kernel info page.

Returns:
Address to the kernel info page or 0 if page is invalid.

L4_CV int l4sigma0_kip_map_to ( l4_threadid_t  pager,
void *  addr 
)

Map the kernel info page from pager to addr.

Parameters:
pager pager implementing the Sigma0 protocol
addr address to map KIP to
Returns:
0 on success, !=0 on error

L4_CV l4_kernel_info_t* l4sigma0_kip_map ( l4_threadid_t  pager  ) 

Map the kernel info page.

Maps the kernel info page to a library private address.

Parameters:
pager pager implementing the Sigma0 protocol (use L4_INVALID_ID to call sigma0)
Returns:
Address to the kernel info page or 0 if page is invalid.

L4_CV void l4sigma0_kip_unmap ( void   ) 

Unmap the kernel info page.

Unmaps the kernel info page from the library private address.

L4_CV l4_umword_t l4sigma0_kip_version ( void   ) 

Get the kernel version.

Returns the kernel version. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

Returns:
Kernel version string. 0 if KIP could not be mapped.

L4_CV const char* l4sigma0_kip_version_string ( void   ) 

Get the kernel version string.

Returns the kernel version banner string. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

Returns:
Kernel version string.

L4_CV int l4sigma0_kip_kernel_is_ux ( void   ) 

Return whether the kernel is running native or under UX.

Returns whether the kernel is running natively or under UX. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

Returns:
1 when running under UX, 0 if not running under UX

L4_CV int l4sigma0_kip_kernel_has_feature ( const char *  str  ) 

Check if kernel supports a feature.

Parameters:
str Feature name to check.
Returns:
1 if the kernel supports the feature, 0 if not.
Checks the feature field in the KIP for the given string. The KIP will be mapped if not already mapped. The KIP will not be unmapped again.

L4_CV unsigned long l4sigma0_kip_kernel_abi_version ( void   ) 

Return kernel ABI version.

Returns:
Kernel ABI version.


Generated on Wed Apr 11 06:38:27 2012 for SIGMA0 Protocol Bindings by  doxygen 1.5.6