Skip to content

[kernel][rsoc]tick long long unit #9496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/rtdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ extern "C" {
#define RT_UINT64_MAX 0xFFFFFFFFFFFFFFFFULL /**< Maximum number of UINT64 */
#endif /* RT_USING_LIBC */

#ifdef RT_TICK_USING_64BIT
#define RT_TICK_MAX RT_UINT64_MAX /**< Maximum number of tick */
#else
#define RT_TICK_MAX RT_UINT32_MAX /**< Maximum number of tick */
#endif /* RT_TICK_USING_64BIT */

/* maximum value of ipc type */
#define RT_SEM_VALUE_MAX RT_UINT16_MAX /**< Maximum number of semaphore .value */
Expand Down
7 changes: 6 additions & 1 deletion include/rttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ typedef rt_ubase_t rt_intptr_t; /**< Type for signed poi
typedef rt_base_t rt_uintptr_t; /**< Type for unsigned pointer length integer */
#endif /* defined(RT_USING_LIBC) && !defined(RT_USING_NANO) */

#ifdef RT_TICK_USING_64BIT
typedef rt_uint64_t rt_tick_t; /**< Type for tick count */
#else
typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
#endif /* RT_TICK_USING_64BIT */

typedef rt_base_t rt_err_t; /**< Type for error number */
typedef rt_uint32_t rt_time_t; /**< Type for time stamp */
typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
typedef rt_base_t rt_flag_t; /**< Type for flags */
typedef rt_ubase_t rt_dev_t; /**< Type for device */
typedef rt_base_t rt_off_t; /**< Type for offset */
Expand Down
6 changes: 6 additions & 0 deletions src/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ config RT_TICK_PER_SECOND
help
System's tick frequency, Hz.

config RT_TICK_USING_64BIT
bool "Using 64-bit systick"
default n
help
Using long long as tick unit, this is useful when the tick frequency is very high.

config RT_USING_HOOK
bool "Enable system hook"
default y
Expand Down
Loading