Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/bitset.9
Show First 20 Lines • Show All 351 Lines • ▼ Show 20 Lines | |||||
is set to the index of successive set bits. | is set to the index of successive set bits. | ||||
The value of | The value of | ||||
.Fa bit | .Fa bit | ||||
after the loop terminates is undefined. | after the loop terminates is undefined. | ||||
Similarly, | Similarly, | ||||
.Fn BIT_FOREACH_ISCLR | .Fn BIT_FOREACH_ISCLR | ||||
iterates over all clear bits in | iterates over all clear bits in | ||||
.Fa bitset . | .Fa bitset . | ||||
Within the loop body, the currently indexed bit may be set or | |||||
cleared. | |||||
However, setting or clearing bits other than the currently indexed | |||||
bit does not guarantee that they will or will not be returned in | |||||
subsequent iterations. | |||||
rlibby: So, as coded, I think this would be "in the current iteration" -- they should be reflected in… | |||||
markjAuthorUnsubmitted Done Inline ActionsBy "in the current iteration" I meant a single execution of the loop body, not a full iteration over the set. I tried to make this a bit more clear. markj: By "in the current iteration" I meant a single execution of the loop body, not a full iteration… | |||||
rlibbyUnsubmitted Not Done Inline ActionsAh, yeah, thanks for the clarification. rlibby: Ah, yeah, thanks for the clarification. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn BIT_COUNT | .Fn BIT_COUNT | ||||
macro returns the total number of set bits in | macro returns the total number of set bits in | ||||
.Fa bitset . | .Fa bitset . | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fn BIT_SUBSET | .Fn BIT_SUBSET | ||||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |
So, as coded, I think this would be "in the current iteration" -- they should be reflected in later iterations after this one. However if you just prefer this to be more general, that's fine too.