cvs commit: src/sys/sys thread2.h
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue May 4 10:13:12 PDT 2004
dillon 2004/05/04 10:13:04 PDT
DragonFly src repository
Modified files:
sys/sys thread2.h
Log:
A memory ordering barrier is needed in crit_exit() ensure that td_pri
is adjusted before gd_reqflags is tested.
Reorder the tests in crit_exit() as a branch prediction optimization.
Check gd_reqflags first, since it is likely to be NULL, and td_pri second,
since thd td_pri check may oscillate depending on the critical section's
nesting level.
Load the globaldata pointer before adjusting td_pri in crit_exit_quick()
as an instruction ordering optimization.
Revision Changes Path
1.15 +9 -2 src/sys/sys/thread2.h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/thread2.h.diff?r1=1.14&r2=1.15&f=h
More information about the Commits
mailing list