[ofw] [RFC] [PATCH 3/4] index list: new component to map quickly from an index to a pointer
Fab Tillier
ftillier at windows.microsoft.com
Tue Apr 22 17:37:11 PDT 2008
So you maintain two lists - one of free items, the first entry pointed to by FreeList and the other at pArray[0].Entry.Next, right? A comment or two wouldn't hurt, too - it would make it easier to review the code.
>+typedef struct _INDEX_LIST_ENTRY
>+{
>+ SIZE_T Next;
>+ SIZE_T Prev;
>+
>+} INDEX_LIST_ENTRY;
Not sure what the INDEX_LIST_ENTRY structure does for you since you never use it except to make your notation Entry.Next rather than simply Next.
>>+static void *IndexListRemoveFirst(INDEX_LIST *pIndexList)
>+{
>+ return IndexListRemove(pIndexList, pIndexList->pArray[0].Entry.Next);
>+}
Doesn't this remove the last entry added to the index, not the first?
Serialization must be provided by the caller?
-Fab
More information about the ofw
mailing list