diff options
Diffstat (limited to 'libcr/coroutine.c')
-rw-r--r-- | libcr/coroutine.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c index a947ae9..7392b6c 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -635,6 +635,12 @@ void coroutine_main(void) { assert(saved); assert(!cr_is_in_intrhandler()); coroutine_running = 0; +#if CONFIG_COROUTINE_GDB + /* Some pointless call to prevent cr_gdb_readjmp() from + * getting pruned out of the firmware image. */ + if (coroutine_table[0].state != CR_NONE) + cr_gdb_readjmp(&coroutine_table[0].env); +#endif while (coroutine_cnt) { cid_t next; while ( !((next = coroutine_ringbuf_pop())) ) { |