legacy: use k_cycle_get_32 instead of legacy sys_cycle_get_32
Jira: ZEP-1585 Change-Id: Idac4685625f191771b90ce78234d97f5143413f0 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
003a46a2f2
commit
b52a5450b0
9 changed files with 13 additions and 13 deletions
|
@ -52,7 +52,7 @@ static atomic_val_t _rand32_counter;
|
|||
|
||||
uint32_t sys_rand32_get(void)
|
||||
{
|
||||
return sys_cycle_get_32() + atomic_add(&_rand32_counter, _RAND32_INC);
|
||||
return k_cycle_get_32() + atomic_add(&_rand32_counter, _RAND32_INC);
|
||||
}
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
|
|
@ -74,7 +74,7 @@ DEVICE_AND_API_INIT(random_mcux, CONFIG_RANDOM_NAME,
|
|||
|
||||
static int random_mcux_init(struct device *dev)
|
||||
{
|
||||
uint32_t seed = sys_cycle_get_32();
|
||||
uint32_t seed = k_cycle_get_32();
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ static int8_t dht_measure_signal_duration(struct dht_data *drv_data,
|
|||
(uint64_t)sys_clock_hw_cycles_per_sec /
|
||||
(uint64_t)USEC_PER_SEC
|
||||
);
|
||||
uint32_t start_cycles = sys_cycle_get_32();
|
||||
uint32_t start_cycles = k_cycle_get_32();
|
||||
|
||||
do {
|
||||
gpio_pin_read(drv_data->gpio, CONFIG_DHT_GPIO_PIN_NUM, &val);
|
||||
elapsed_cycles = sys_cycle_get_32() - start_cycles;
|
||||
elapsed_cycles = k_cycle_get_32() - start_cycles;
|
||||
|
||||
if (elapsed_cycles >= max_wait_cycles) {
|
||||
return -1;
|
||||
|
|
|
@ -75,7 +75,7 @@ typedef uint32_t (*sys_k_timer_func_t)(void);
|
|||
#ifdef CONFIG_KERNEL_EVENT_LOGGER_CUSTOM_TIMESTAMP
|
||||
extern sys_k_timer_func_t _sys_k_get_time;
|
||||
#else
|
||||
#define _sys_k_get_time sys_cycle_get_32
|
||||
#define _sys_k_get_time k_cycle_get_32
|
||||
#endif /* CONFIG_KERNEL_EVENT_LOGGER_CUSTOM_TIMESTAMP */
|
||||
|
||||
/**
|
||||
|
|
|
@ -133,7 +133,7 @@ void main(void)
|
|||
|
||||
/* get some random data, and clear out data[] */
|
||||
for (i = 0; i < sizeof(cmp_data); i++) {
|
||||
cmp_data[i] = sys_cycle_get_32() & 0xFF;
|
||||
cmp_data[i] = k_cycle_get_32() & 0xFF;
|
||||
data[i] = 0x00;
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ void main(void)
|
|||
/* Do multi-byte read/write */
|
||||
/* get some random data, and clear out data[] */
|
||||
for (uint32_t i = 0; i < sizeof(cmp_data); i++) {
|
||||
cmp_data[i] = sys_cycle_get_32() & 0xFF;
|
||||
cmp_data[i] = k_cycle_get_32() & 0xFF;
|
||||
data[i] = 0x00;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static void zperf_tcp_rx_fiber(int port)
|
|||
while (1) {
|
||||
struct net_buf *buf = net_receive(net_context, TICKS_UNLIMITED);
|
||||
struct session *session = NULL;
|
||||
uint32_t time = sys_cycle_get_32();
|
||||
uint32_t time = k_cycle_get_32();
|
||||
|
||||
if (buf == NULL) {
|
||||
printk(TAG "buf is null\n");
|
||||
|
@ -90,7 +90,7 @@ static void zperf_tcp_rx_fiber(int port)
|
|||
case STATE_COMPLETED:
|
||||
printk(TAG "New session started\n");
|
||||
zperf_reset_session_stats(session);
|
||||
session->start_time = sys_cycle_get_32();
|
||||
session->start_time = k_cycle_get_32();
|
||||
session->state = STATE_ONGOING;
|
||||
case STATE_ONGOING:
|
||||
session->counter++;
|
||||
|
|
|
@ -44,7 +44,7 @@ void zperf_tcp_upload(struct net_context *net_context,
|
|||
}
|
||||
|
||||
/* Start the loop */
|
||||
start_time = sys_cycle_get_32();
|
||||
start_time = k_cycle_get_32();
|
||||
last_print_time = start_time;
|
||||
last_loop_time = start_time;
|
||||
printk(TAG "New session started\n");
|
||||
|
@ -54,7 +54,7 @@ void zperf_tcp_upload(struct net_context *net_context,
|
|||
int ret = 0;
|
||||
|
||||
/* Timestamps */
|
||||
loop_time = sys_cycle_get_32();
|
||||
loop_time = k_cycle_get_32();
|
||||
last_loop_time = loop_time;
|
||||
|
||||
/* Get a new TX buffer */
|
||||
|
@ -105,7 +105,7 @@ again:
|
|||
fiber_yield();
|
||||
} while (!finished);
|
||||
|
||||
end_time = sys_cycle_get_32();
|
||||
end_time = k_cycle_get_32();
|
||||
|
||||
/* Add result coming from the client */
|
||||
results->nb_packets_sent = nb_packets;
|
||||
|
|
|
@ -151,7 +151,7 @@ static void udp_received(struct net_context *context,
|
|||
return;
|
||||
}
|
||||
|
||||
time = sys_cycle_get_32();
|
||||
time = k_cycle_get_32();
|
||||
|
||||
session = get_session(buf, SESSION_UDP);
|
||||
if (!session) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue