Skip to content

Commit

Permalink
runtime: remove confusing variable shadowing.
Browse files Browse the repository at this point in the history
whitequark committed Jun 19, 2016
1 parent 4e241f1 commit 8e2c664
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions artiq/runtime/ksupport.c
Original file line number Diff line number Diff line change
@@ -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;

4 changes: 2 additions & 2 deletions artiq/runtime/ksupport.h
Original file line number Diff line number Diff line change
@@ -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, ...);

0 comments on commit 8e2c664

Please sign in to comment.