RFC: ptrlist insert during iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have give this a little bit more thought.
Find more bugs in the previous proposal.

Data structure:
occupier mask:
     indicate which ptrlist entry is valid.
insert mask:
     Indicate which ptrlist entry is new insert during current loop.

I find out for each ptr iteration. The insert mask need to restart
with fresh zero.
e.g. if the insert mask start with 00010B, and after the current
ptr iteration, the insert mask become 00110B. The loop iterator
has no way to tell if the new bit was insert before or after the
original bit.

That is the reason insert mask will need to start fresh zero
for each pointer iteration.

If there is nest loops, the inner loop will need to maintain and
merge the insert mask for the outer loop.

It need some thing similar to the ptrlist refcount to do some
save/merge on the insert mask context when iterator
enter/exit the ptrlist node.

It is pretty complicate, but do able if we really want to do it.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux