cpu/esp_common: Declare sched_active_{thread,pid}

Declare sched_active_thread and sched_active_pid locally in the ESP code for
now. Once the code is cleaned up to no longer tap into scheduler internals but
use the API instead, those can be dropped again.
This commit is contained in:
Marian Buschsieweke 2020-08-27 11:01:45 +02:00
parent 2d8bdf9b83
commit c5c62e93d3
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,7 @@ BaseType_t xTaskCreate (TaskFunction_t pvTaskCode,
void vTaskDelete (TaskHandle_t xTaskToDelete)
{
extern volatile thread_t *sched_active_thread;
DEBUG("%s pid=%d task=%p\n", __func__, thread_getpid(), xTaskToDelete);
assert(xTaskToDelete != NULL);

View File

@ -416,6 +416,8 @@ NORETURN void cpu_switch_context_exit(void)
*/
NORETURN void task_exit(void)
{
extern volatile thread_t *sched_active_thread;
extern volatile kernel_pid_t sched_active_pid;
DEBUG("sched_task_exit: ending thread %" PRIkernel_pid "...\n",
thread_getpid());