DragonFly commits List (threaded) for 2004-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: cvs commit: src/sys/kern kern_timeout.c
Fixed!
-Matt
Matthew Dillon
<dillon@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;
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]