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

Function workerSampleInstrumentation

modules/base/worker/modWorker.c:616–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614extern void fxSampleInstrumentation(xsMachine * the, xsIntegerValue count, xsIntegerValue* values);
615
616void workerSampleInstrumentation(modTimer timer, void *refcon, int refconSize)
617{
618 xsMachine *the = *(xsMachine **)refcon;
619#ifdef INC_FREERTOS_H
620 extern SemaphoreHandle_t gInstrumentMutex;
621 xSemaphoreTake(gInstrumentMutex, portMAX_DELAY);
622#elif __ZEPHYR__
623 extern struct k_mutex gInstrumentMutex;
624 k_mutex_lock(&gInstrumentMutex, K_FOREVER);
625#endif
626
627 fxSampleInstrumentation(the, 0, NULL);
628 modInstrumentMachineReset(the);
629
630#ifdef INC_FREERTOS_H
631 xSemaphoreGive(gInstrumentMutex);
632#elif __ZEPHYR__
633 k_mutex_unlock(&gInstrumentMutex);
634#endif
635}
636#endif

Callers

nothing calls this directly

Calls 2

fxSampleInstrumentationFunction · 0.85

Tested by

no test coverage detected