zephyr: replace zephyr integer types with C99 types

git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-05-27 11:26:57 -05:00 committed by Kumar Gala
commit a1b77fd589
2364 changed files with 32505 additions and 32505 deletions

View file

@ -58,11 +58,11 @@ static struct k_spinlock lock;
#if SMP_TIMER_DRIVER
volatile static u64_t last_time;
volatile static u64_t start_time;
volatile static uint64_t last_time;
volatile static uint64_t start_time;
#else
static u32_t last_load;
static uint32_t last_load;
/*
@ -75,13 +75,13 @@ static u32_t last_load;
*
* t = cycle_counter + elapsed();
*/
static u32_t cycle_count;
static uint32_t cycle_count;
/*
* This local variable holds the amount of elapsed HW cycles
* that have been announced to the kernel.
*/
static u32_t announced_cycles;
static uint32_t announced_cycles;
/*
@ -93,7 +93,7 @@ static u32_t announced_cycles;
* Each time cycle_count is updated with the value from overflow_cycles,
* the overflow_cycles must be reset to zero.
*/
static volatile u32_t overflow_cycles;
static volatile uint32_t overflow_cycles;
#endif
/**
@ -102,7 +102,7 @@ static volatile u32_t overflow_cycles;
*
* @return Current Timer0 count
*/
static ALWAYS_INLINE u32_t timer0_count_register_get(void)
static ALWAYS_INLINE uint32_t timer0_count_register_get(void)
{
return z_arc_v2_aux_reg_read(_ARC_V2_TMR0_COUNT);
}
@ -113,7 +113,7 @@ static ALWAYS_INLINE u32_t timer0_count_register_get(void)
*
* @return N/A
*/
static ALWAYS_INLINE void timer0_count_register_set(u32_t value)
static ALWAYS_INLINE void timer0_count_register_set(uint32_t value)
{
z_arc_v2_aux_reg_write(_ARC_V2_TMR0_COUNT, value);
}
@ -124,7 +124,7 @@ static ALWAYS_INLINE void timer0_count_register_set(u32_t value)
*
* @return N/A
*/
static ALWAYS_INLINE u32_t timer0_control_register_get(void)
static ALWAYS_INLINE uint32_t timer0_control_register_get(void)
{
return z_arc_v2_aux_reg_read(_ARC_V2_TMR0_CONTROL);
}
@ -135,7 +135,7 @@ static ALWAYS_INLINE u32_t timer0_control_register_get(void)
*
* @return N/A
*/
static ALWAYS_INLINE void timer0_control_register_set(u32_t value)
static ALWAYS_INLINE void timer0_control_register_set(uint32_t value)
{
z_arc_v2_aux_reg_write(_ARC_V2_TMR0_CONTROL, value);
}
@ -146,7 +146,7 @@ static ALWAYS_INLINE void timer0_control_register_set(u32_t value)
*
* @return N/A
*/
static ALWAYS_INLINE u32_t timer0_limit_register_get(void)
static ALWAYS_INLINE uint32_t timer0_limit_register_get(void)
{
return z_arc_v2_aux_reg_read(_ARC_V2_TMR0_LIMIT);
}
@ -157,7 +157,7 @@ static ALWAYS_INLINE u32_t timer0_limit_register_get(void)
*
* @return N/A
*/
static ALWAYS_INLINE void timer0_limit_register_set(u32_t count)
static ALWAYS_INLINE void timer0_limit_register_set(uint32_t count)
{
z_arc_v2_aux_reg_write(_ARC_V2_TMR0_LIMIT, count);
}
@ -180,9 +180,9 @@ static ALWAYS_INLINE void timer0_limit_register_set(u32_t count)
* - and until the current call of the function is completed.
* - the function is invoked with interrupts disabled.
*/
static u32_t elapsed(void)
static uint32_t elapsed(void)
{
u32_t val, ctrl;
uint32_t val, ctrl;
do {
val = timer0_count_register_get();
@ -222,10 +222,10 @@ static u32_t elapsed(void)
static void timer_int_handler(void *unused)
{
ARG_UNUSED(unused);
u32_t dticks;
uint32_t dticks;
#if defined(CONFIG_SMP) && CONFIG_MP_NUM_CPUS > 1
u64_t curr_time;
uint64_t curr_time;
k_spinlock_key_t key;
/* clear the IP bit of the control register */
@ -250,7 +250,7 @@ static void timer_int_handler(void *unused)
/* irq with higher priority may call z_clock_set_timeout
* so need a lock here
*/
u32_t key;
uint32_t key;
key = arch_irq_lock();
@ -314,7 +314,7 @@ int z_clock_driver_init(struct device *device)
return 0;
}
void z_clock_set_timeout(s32_t ticks, bool idle)
void z_clock_set_timeout(int32_t ticks, bool idle)
{
/* If the kernel allows us to miss tick announcements in idle,
* then shut off the counter. (Note: we can assume if idle==true
@ -334,8 +334,8 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
}
#if defined(CONFIG_TICKLESS_KERNEL)
u32_t delay;
u32_t key;
uint32_t delay;
uint32_t key;
ticks = MIN(MAX_TICKS, ticks);
@ -366,10 +366,10 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
}
#if defined(CONFIG_TICKLESS_KERNEL)
u32_t delay;
u32_t unannounced;
uint32_t delay;
uint32_t unannounced;
ticks = MIN(MAX_TICKS, (u32_t)(MAX((s32_t)(ticks - 1), 0)));
ticks = MIN(MAX_TICKS, (uint32_t)(MAX((int32_t)(ticks - 1), 0)));
k_spinlock_key_t key = k_spin_lock(&lock);
@ -386,7 +386,7 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
/* normal case */
unannounced = cycle_count - announced_cycles;
if ((s32_t)unannounced < 0) {
if ((int32_t)unannounced < 0) {
/* We haven't announced for more than half the 32-bit
* wrap duration, because new timeouts keep being set
* before the existing one fires. Force an announce
@ -417,13 +417,13 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
#endif
}
u32_t z_clock_elapsed(void)
uint32_t z_clock_elapsed(void)
{
if (!TICKLESS) {
return 0;
}
u32_t cyc;
uint32_t cyc;
k_spinlock_key_t key = k_spin_lock(&lock);
#if SMP_TIMER_DRIVER
@ -437,13 +437,13 @@ u32_t z_clock_elapsed(void)
return cyc / CYC_PER_TICK;
}
u32_t z_timer_cycle_get_32(void)
uint32_t z_timer_cycle_get_32(void)
{
#if SMP_TIMER_DRIVER
return z_arc_connect_gfrc_read() - start_time;
#else
k_spinlock_key_t key = k_spin_lock(&lock);
u32_t ret = elapsed() + cycle_count;
uint32_t ret = elapsed() + cycle_count;
k_spin_unlock(&lock, key);
return ret;