From 8e2c664e8bca2263fc151cb3e33d185526613f46 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 19 Jun 2016 06:32:50 +0000 Subject: [PATCH] runtime: remove confusing variable shadowing. --- artiq/runtime/ksupport.c | 11 ++++------- artiq/runtime/ksupport.h | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/artiq/runtime/ksupport.c b/artiq/runtime/ksupport.c index d6c087de9..8cbb0d94a 100644 --- a/artiq/runtime/ksupport.c +++ b/artiq/runtime/ksupport.c @@ -368,9 +368,9 @@ int main(void) mailbox_send_and_wait(&load_reply); - now = now_init(); + now_init(); kernel_run(); - now_save(now); + now_save(); attribute_writeback(typeinfo); @@ -404,11 +404,10 @@ void ksupport_abort() { 0, 0, 0); } -long long int now_init(void) +void now_init(void) { struct msg_base request; struct msg_now_init_reply *reply; - long long int now; request.type = MESSAGE_TYPE_NOW_INIT_REQUEST; mailbox_send_and_wait(&request); @@ -426,11 +425,9 @@ long long int now_init(void) rtio_init(); now = rtio_get_counter() + (272000 << CONFIG_RTIO_FINE_TS_WIDTH); } - - return now; } -void now_save(long long int now) +void now_save(void) { struct msg_now_save request; diff --git a/artiq/runtime/ksupport.h b/artiq/runtime/ksupport.h index c14128456..fc82332e3 100644 --- a/artiq/runtime/ksupport.h +++ b/artiq/runtime/ksupport.h @@ -6,8 +6,8 @@ struct artiq_list { int32_t *elements; }; -long long int now_init(void); -void now_save(long long int now); +void now_init(void); +void now_save(void); int watchdog_set(int ms); void watchdog_clear(int id); void send_rpc(int service, const char *tag, ...);