cvs commit: src/sys/kern kern_timeout.c

Matthew Dillon dillon at apollo.backplane.com
Mon Apr 26 13:07:22 PDT 2004


    Fixed!

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

:I'm seeing the following warnings after this change:
:/home/source/dragonfly/src/sys/kern/kern_timeout.c:114: warning: assignment discards qualifiers from pointer target type
:/home/source/dragonfly/src/sys/kern/kern_timeout.c:138: warning: assignment discards qualifiers from pointer target type
:
:The current code makes the memory object pointed to by nextsoftcheck
:volatile(so that accesses to members of nextsoftcheck are not cached),
:but not the nextsoftcheck itself. Since c has no volatile qualifier,
:derefences through c is not volatile, making the volatility on
:nextsoftcheck useless.
:
:If you want to make nextsoftcheck itself volatile, you have to change
:it as follows:
:
:static struct callout *volatile nextsoftcheck;
:
:If you want to make both nextsoftcheck and the memory location pointed to
:by it volatile:
:
:static volatile struct callout *volatile nextsoftcheck;





More information about the Commits mailing list