cc334c7273
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99 integer types. This handles the remaining includes and kernel, plus touching up various points that we skipped because of include dependancies. We also convert the PRI printf formatters in the arch code over to normal formatters. Jira: ZEP-2051 Change-Id: Iecbb12601a3ee4ea936fd7ddea37788a645b08b0 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
42 lines
1,006 B
C
42 lines
1,006 B
C
/* kernel version support */
|
|
|
|
/*
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef _kernel_version__h_
|
|
#define _kernel_version__h_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* The kernel version has been converted from a string to a four-byte
|
|
* quantity that is divided into two parts.
|
|
*
|
|
* Part 1: The three most significant bytes represent the kernel's
|
|
* numeric version, x.y.z. These fields denote:
|
|
* x -- major release
|
|
* y -- minor release
|
|
* z -- patchlevel release
|
|
* Each of these elements must therefore be in the range 0 to 255, inclusive.
|
|
*
|
|
* Part 2: The least significant byte is reserved for future use.
|
|
*/
|
|
#define SYS_KERNEL_VER_MAJOR(ver) ((ver >> 24) & 0xFF)
|
|
#define SYS_KERNEL_VER_MINOR(ver) ((ver >> 16) & 0xFF)
|
|
#define SYS_KERNEL_VER_PATCHLEVEL(ver) ((ver >> 8) & 0xFF)
|
|
|
|
/* kernel version routines */
|
|
|
|
extern u32_t sys_kernel_version_get(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _kernel_version__h_ */
|