Get the next item from the iterator in elem
.
Only when this function returns OK, elem
will contain a valid
value. elem
must have been initialized to the type of the iterator or initialized to zeroes with unset
. The caller is responsible for unsetting or resetting elem
with unset or
reset after usage.
When this function returns DONE, no more elements can be retrieved from this.
A return value of RESYNC indicates that the element list was concurrently updated. The user of this should call resync to get the newly updated list.
A return value of ERROR indicates an unrecoverable fatal error.
this |
The Iterator to iterate |
elem |
pointer to hold next element |