Merge branch 'develop' into nice-threads

This commit is contained in:
Thomas Göttgens
2022-12-30 20:18:19 +01:00
committed by GitHub
95 changed files with 1167 additions and 1072 deletions

View File

@@ -13,12 +13,12 @@ InterruptableDelay::~InterruptableDelay() {}
*/
bool InterruptableDelay::delay(uint32_t msec)
{
// DEBUG_MSG("delay %u ", msec);
// LOG_DEBUG("delay %u ", msec);
// sem take will return false if we timed out (i.e. were not interrupted)
bool r = semaphore.take(msec);
// DEBUG_MSG("interrupt=%d\n", r);
// LOG_DEBUG("interrupt=%d\n", r);
return !r;
}

View File

@@ -33,11 +33,11 @@ IRAM_ATTR bool NotifiedWorkerThread::notifyCommon(uint32_t v, bool overwrite)
notification = v;
if (debugNotification)
DEBUG_MSG("setting notification %d\n", v);
LOG_DEBUG("setting notification %d\n", v);
return true;
} else {
if (debugNotification)
DEBUG_MSG("dropping notification %d\n", v);
LOG_DEBUG("dropping notification %d\n", v);
return false;
}
}
@@ -66,7 +66,7 @@ bool NotifiedWorkerThread::notifyLater(uint32_t delay, uint32_t v, bool overwrit
if (didIt) { // If we didn't already have something queued, override the delay to be larger
setIntervalFromNow(delay); // a new version of setInterval relative to the current time
if (debugNotification)
DEBUG_MSG("delaying notification %u\n", delay);
LOG_DEBUG("delaying notification %u\n", delay);
}
return didIt;

View File

@@ -61,13 +61,13 @@ bool OSThread::shouldRun(unsigned long time)
bool r = Thread::shouldRun(time);
if (showRun && r)
DEBUG_MSG("Thread %s: run\n", ThreadName.c_str());
LOG_DEBUG("Thread %s: run\n", ThreadName.c_str());
if (showWaiting && enabled && !r)
DEBUG_MSG("Thread %s: wait %lu\n", ThreadName.c_str(), interval);
LOG_DEBUG("Thread %s: wait %lu\n", ThreadName.c_str(), interval);
if (showDisabled && !enabled)
DEBUG_MSG("Thread %s: disabled\n", ThreadName.c_str());
LOG_DEBUG("Thread %s: disabled\n", ThreadName.c_str());
return r;
}