MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / workerLoop

Function workerLoop

modules/base/worker/modWorker.c:564–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562#ifdef INC_FREERTOS_H
563
564void workerLoop(void *pvParameter)
565{
566 modWorker worker = (modWorker)pvParameter;
567
568#if CONFIG_ESP_TASK_WDT_EN
569 esp_task_wdt_add(NULL);
570#endif
571
572 if (workerStart(worker)) {
573 modMachineTaskWake(worker->parent);
574 while (true) // wait: caller deletes task
575 vTaskDelay(1000);
576 }
577 modMachineTaskWake(worker->parent);
578
579 while (true) {
580 modTimersExecute();
581 modMessageService(worker->the, modTimersNext());
582#if qca4020
583 qca4020_watchdog();
584#elif nrf52
585 modWatchDogReset();
586#endif
587 }
588}
589#elif __ZEPHYR__
590
591void workerLoop(void *a, void *b, void *c)

Callers

nothing calls this directly

Calls 5

workerStartFunction · 0.85
modMachineTaskWakeFunction · 0.50
modTimersExecuteFunction · 0.50
modMessageServiceFunction · 0.50
modTimersNextFunction · 0.50

Tested by

no test coverage detected