Skip to content

Commit

Permalink
Undo cbprintf fix real culprit, the number of stacks allocated for th…
Browse files Browse the repository at this point in the history
…reads
  • Loading branch information
erlingrj committed Sep 21, 2024
1 parent 85e56ec commit 8986632
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions low_level_platform/impl/src/lf_zephyr_clock_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ void _lf_initialize_clock() {
uint32_t counter_max_ticks = 0;
int res;

_lf_initialize_clock_zephyr_common();

// Verify that we have the device
if (!device_is_ready(counter_dev)) {
lf_print_error_and_exit("ERROR: counter device not ready.\n");
Expand Down
1 change: 0 additions & 1 deletion low_level_platform/impl/src/lf_zephyr_clock_kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static volatile bool async_event = false;
K_SEM_DEFINE(sleeping_sem, 0, 1)

void _lf_initialize_clock() {
_lf_initialize_clock_zephyr_common();
timer_freq = CONFIG_SYS_CLOCK_TICKS_PER_SEC;
lf_print("--- Using LF Zephyr Kernel Clock with a frequency of %u Hz", timer_freq);
}
Expand Down
10 changes: 4 additions & 6 deletions low_level_platform/impl/src/lf_zephyr_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf* esf)
lf_print_error_and_exit("Zephyr kernel panic reason=%d", reason);
}

void _lf_initialize_clock_zephyr_common() {
// Use the Zephyr implementation of printf. This avoids some wierd memory
// issues that intermittently arise when calling vfprintf.
lf_register_print_function(vfprintfcb, LOG_LEVEL_ERROR);
}

int lf_sleep(interval_t sleep_duration) {
k_sleep(K_NSEC(sleep_duration));
return 0;
Expand Down Expand Up @@ -94,8 +88,12 @@ int lf_enable_interrupts_nested() {
// If NUMBER_OF_WORKERS is not specified, or set to 0, then we default to 1.
#if !defined(NUMBER_OF_WORKERS) || NUMBER_OF_WORKERS == 0
#undef NUMBER_OF_WORKERS
#if defined(LF_REACTION_GRAPH_BREADTH)
#define NUMBER_OF_WORKERS LF_REACTION_GRAPH_BREADTH
#else
#define NUMBER_OF_WORKERS 1
#endif
#endif

// If USER_THREADS is not specified, then default to 0.
#if !defined(USER_THREADS)
Expand Down

0 comments on commit 8986632

Please sign in to comment.