/* check that timer_cb[12] are incrementing 'cnt' */
cnt1 = READ_ONCE(timer_skel->bss->cnt); for (int i = 0; i < 100; i++) {
cnt2 = READ_ONCE(timer_skel->bss->cnt); if (cnt2 != cnt1) break;
usleep(200); /* 100 times more than interval */
}
ASSERT_GT(cnt2, cnt1, "cnt");
/* check that timer_cb[12] are no longer running */
cnt1 = READ_ONCE(timer_skel->bss->cnt); for (int i = 0; i < 100; i++) {
usleep(200); /* 100 times more than interval */
cnt2 = READ_ONCE(timer_skel->bss->cnt); if (cnt2 == cnt1) break;
}
ASSERT_EQ(cnt2, cnt1, "cnt");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.