Add "sys_" prefix to public kernel versioning APIs
Eliminates the need to reserve the "kernel_" prefix in the kernel namespace. Also, aligns versioning with other APIs that are neither nanokernel_ or microkernel-specific, such as the system clock APIs. Change-Id: I81e43cd03849b45a4b432b0875dc8b1d5862dba9 Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
11dcaf2ae4
commit
40a719d584
3 changed files with 9 additions and 9 deletions
|
@ -51,16 +51,16 @@
|
||||||
*
|
*
|
||||||
* Part 3: The least significant byte is reserved for future use.
|
* Part 3: The least significant byte is reserved for future use.
|
||||||
*/
|
*/
|
||||||
#define KERNEL_VER_GENERATION(ver) ((ver >> 28) & 0x0F)
|
#define SYS_KERNEL_VER_GENERATION(ver) ((ver >> 28) & 0x0F)
|
||||||
#define KERNEL_VER_MAJOR(ver) ((ver >> 24) & 0x0F)
|
#define SYS_KERNEL_VER_MAJOR(ver) ((ver >> 24) & 0x0F)
|
||||||
#define KERNEL_VER_MINOR(ver) ((ver >> 20) & 0x0F)
|
#define SYS_KERNEL_VER_MINOR(ver) ((ver >> 20) & 0x0F)
|
||||||
#define KERNEL_VER_SERVICEPACK(ver) ((ver >> 16) & 0x0F)
|
#define SYS_KERNEL_VER_SERVICEPACK(ver) ((ver >> 16) & 0x0F)
|
||||||
|
|
||||||
/* return 8-bit flags */
|
/* return 8-bit flags */
|
||||||
#define KERNEL_VER_FLAGS(ver) ((ver >> 8) & 0xFF)
|
#define SYS_KERNEL_VER_FLAGS(ver) ((ver >> 8) & 0xFF)
|
||||||
|
|
||||||
/* kernel version routines */
|
/* kernel version routines */
|
||||||
|
|
||||||
extern uint32_t kernel_version_get(void);
|
extern uint32_t sys_kernel_version_get(void);
|
||||||
|
|
||||||
#endif /* _kernel_version__h_ */
|
#endif /* _kernel_version__h_ */
|
||||||
|
|
|
@ -41,7 +41,7 @@ static uint32_t kernel_version = KERNELVERSION;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* kernel_version_get - return the kernel version of the present build
|
* sys_kernel_version_get - return the kernel version of the present build
|
||||||
*
|
*
|
||||||
* The kernel version is a four-byte value, whose format is decribed in the
|
* The kernel version is a four-byte value, whose format is decribed in the
|
||||||
* file "kernel_version.h".
|
* file "kernel_version.h".
|
||||||
|
@ -49,7 +49,7 @@ static uint32_t kernel_version = KERNELVERSION;
|
||||||
* RETURNS: kernel version
|
* RETURNS: kernel version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint32_t kernel_version_get(void)
|
uint32_t sys_kernel_version_get(void)
|
||||||
{
|
{
|
||||||
return kernel_version;
|
return kernel_version;
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@ void main(void)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
fprintf(output_file, sz_module_title_fmt, "Nanokernel API test");
|
fprintf(output_file, sz_module_title_fmt, "Nanokernel API test");
|
||||||
fprintf(output_file, sz_kernel_ver_fmt, kernel_version_get());
|
fprintf(output_file, sz_kernel_ver_fmt, sys_kernel_version_get());
|
||||||
fprintf(output_file,
|
fprintf(output_file,
|
||||||
"\n\nEach test below are repeated %d times and the average\n"
|
"\n\nEach test below are repeated %d times and the average\n"
|
||||||
"time for one iteration is displayed.", NUMBER_OF_LOOPS);
|
"time for one iteration is displayed.", NUMBER_OF_LOOPS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue