for (i = 0; i < NR_LOOPS; i++) { /* slaves loop on '!= 2' */ while (atomic_read(&count_count_start) != 1)
mb();
atomic_set(&count_count_stop, 0);
smp_wmb();
/* Let the slave writes its count register */
atomic_inc(&count_count_start);
/* Count will be initialised to current timer */ if (i == 1)
initcount = get_cycles();
/* *Everyoneinitialisescountinthelastloop:
*/ if (i == NR_LOOPS-1)
openrisc_timer_set(initcount);
/* *Waitforslavetoleavethesynchronizationpoint:
*/ while (atomic_read(&count_count_stop) != 1)
mb();
atomic_set(&count_count_start, 0);
smp_wmb();
atomic_inc(&count_count_stop);
} /* Arrange for an interrupt in a short while */
openrisc_timer_set_next(COUNTON);
for (i = 0; i < NR_LOOPS; i++) {
atomic_inc(&count_count_start); while (atomic_read(&count_count_start) != 2)
mb();
/* *Everyoneinitialisescountinthelastloop:
*/ if (i == NR_LOOPS-1)
openrisc_timer_set(initcount);
atomic_inc(&count_count_stop); while (atomic_read(&count_count_stop) != 2)
mb();
} /* Arrange for an interrupt in a short while */
openrisc_timer_set_next(COUNTON);
} #undef NR_LOOPS
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-09-27)
¤
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.