| 180 | extern struct k_mutex gDebugMutex; |
| 181 | |
| 182 | void espSampleInstrumentation(modTimer timer, void *refcon, int refconSize) |
| 183 | { |
| 184 | txInteger values[espInstrumentCount]; |
| 185 | int what; |
| 186 | xsMachine *the = *(xsMachine **)refcon; |
| 187 | |
| 188 | k_mutex_lock(&gInstrumentMutex, K_FOREVER); |
| 189 | |
| 190 | for (what = kModInstrumentationPixelsDrawn; what <= (kModInstrumentationSlotHeapSize - 1); what++) |
| 191 | values[what - kModInstrumentationPixelsDrawn] = modInstrumentationGet_(the, what); |
| 192 | |
| 193 | if (values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn]) |
| 194 | values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn] -= 1; // ignore the turn that generates instrumentation |
| 195 | |
| 196 | fxSampleInstrumentation(the, espInstrumentCount, values); |
| 197 | |
| 198 | modInstrumentationSet(PixelsDrawn, 0); |
| 199 | modInstrumentationSet(FramesDrawn, 0); |
| 200 | modInstrumentationSet(PocoDisplayListUsed, 0); |
| 201 | modInstrumentationSet(PiuCommandListUsed, 0); |
| 202 | #if kModInstrumentationHasNetwork |
| 203 | modInstrumentationSet(NetworkBytesRead, 0); |
| 204 | modInstrumentationSet(NetworkBytesWritten, 0); |
| 205 | #endif |
| 206 | modInstrumentationSet(Turns, 0); |
| 207 | modInstrumentMachineReset(the); |
| 208 | |
| 209 | k_mutex_unlock(&gInstrumentMutex); |
| 210 | } |
| 211 | |
| 212 | #endif |
| 213 |
nothing calls this directly
no test coverage detected