static __always_inline void vdso_write_seq_begin(struct vdso_clock *vc)
{ /* * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vc->seq and it is possible that the value seen by the * reader is inconsistent.
*/
WRITE_ONCE(vc->seq, vc->seq + 1);
}
static __always_inline void vdso_write_seq_end(struct vdso_clock *vc)
{ /* * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vc->seq and it is possible that the value seen by the * reader is inconsistent.
*/
WRITE_ONCE(vc->seq, vc->seq + 1);
}
static __always_inline void vdso_write_begin_clock(struct vdso_clock *vc)
{
vdso_write_seq_begin(vc); /* Ensure the sequence invalidation is visible before data is modified */
smp_wmb();
}
static __always_inline void vdso_write_end_clock(struct vdso_clock *vc)
{ /* Ensure the data update is visible before the sequence is set valid again */
smp_wmb();
vdso_write_seq_end(vc);
}
vdso_write_seq_begin(&vc[CS_HRES_COARSE]);
vdso_write_seq_begin(&vc[CS_RAW]); /* Ensure the sequence invalidation is visible before data is modified */
smp_wmb();
}
/* Ensure the data update is visible before the sequence is set valid again */
smp_wmb();
vdso_write_seq_end(&vc[CS_HRES_COARSE]);
vdso_write_seq_end(&vc[CS_RAW]);
}
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.