summaryrefslogtreecommitdiff
path: root/arm9/lib/libnns/include/NNS_FND_list.h
blob: 4bba788243a1379d05751862750809fc2f898405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef GUARD_NNS_FND_LIST_H
#define GUARD_NNS_FND_LIST_H

typedef struct
{
    void*       prevObject;     // Pointer to the previous linked object.
    void*       nextObject;     // Pointer to the next linked object.

} NNSFndLink;

typedef struct
{
    void*       headObject;     // Pointer for the object linked to the top of the list.
    void*       tailObject;     // Pointer for the object linked to the end of the list.
    u16         numObjects;     // Number of objects linked in the list.
    u16         offset;         // Offset for NNSFndLink type structure member.

} NNSFndList;

void NNS_FndInitList(
    NNSFndList *pList,
    s32 alignment
);

void NNS_FndAppendListObject(
    NNSFndList *pList,
    void* object
);

void NNS_FndRemoveListObject(
    NNSFndList *pList,
    void* object
);

#endif //GUARD_NNS_FND_LIST_H