mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-09-05 23:40:01 +00:00
Merge "kata: clang-format C test apps"
GitOrigin-RevId: 88ffd6d1d37febf95c606cf51804069ac5efeb50
This commit is contained in:
@@ -32,8 +32,7 @@ __attribute__((naked)) void _start() {
|
|||||||
"sw a2, 4(sp) \n"
|
"sw a2, 4(sp) \n"
|
||||||
"sw a3, 0(sp) \n"
|
"sw a3, 0(sp) \n"
|
||||||
".option pop \n"
|
".option pop \n"
|
||||||
"j main \n"
|
"j main \n");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// How many Fibonacci numbers to write to the log.
|
// How many Fibonacci numbers to write to the log.
|
||||||
@@ -125,8 +124,7 @@ uint64_t rdtime(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fibonacci_log(int pid,
|
void fibonacci_log(int pid, const fibonacci_state_t *fibonacci_state,
|
||||||
const fibonacci_state_t *fibonacci_state,
|
|
||||||
interrupt_count_t interrupt_count) {
|
interrupt_count_t interrupt_count) {
|
||||||
// TODO(sleffler): bring in snprintf
|
// TODO(sleffler): bring in snprintf
|
||||||
#if 0
|
#if 0
|
||||||
@@ -138,17 +136,15 @@ void fibonacci_log(int pid,
|
|||||||
virtual_seconds(interrupt_count));
|
virtual_seconds(interrupt_count));
|
||||||
minisel_printf(log_buf);
|
minisel_printf(log_buf);
|
||||||
#else
|
#else
|
||||||
minisel_printf("[%d]: "
|
minisel_printf(
|
||||||
|
"[%d]: "
|
||||||
"n == %d; "
|
"n == %d; "
|
||||||
"f == %x; "
|
"f == %x; "
|
||||||
"interrupt_count == %d; "
|
"interrupt_count == %d; "
|
||||||
"rdtime == %d; "
|
"rdtime == %d; "
|
||||||
"virt_sec ~= %d\n",
|
"virt_sec ~= %d\n",
|
||||||
pid,
|
pid, (uint32_t)fibonacci_state->n, (uint32_t)fibonacci_state->f1,
|
||||||
(uint32_t)fibonacci_state->n,
|
(uint32_t)interrupt_count, (uint32_t)rdtime(),
|
||||||
(uint32_t)fibonacci_state->f1,
|
|
||||||
(uint32_t)interrupt_count,
|
|
||||||
(uint32_t)rdtime(),
|
|
||||||
(uint32_t)virtual_seconds(interrupt_count));
|
(uint32_t)virtual_seconds(interrupt_count));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -30,8 +30,7 @@ __attribute__((naked)) void _start() {
|
|||||||
"sw a2, 4(sp) \n"
|
"sw a2, 4(sp) \n"
|
||||||
"sw a3, 0(sp) \n"
|
"sw a3, 0(sp) \n"
|
||||||
".option pop \n"
|
".option pop \n"
|
||||||
"j main \n"
|
"j main \n");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only prints 32-bit "%x" hex values
|
// only prints 32-bit "%x" hex values
|
||||||
|
Reference in New Issue
Block a user