dryos:nameservice
Differences
This shows you the differences between two versions of the page.
dryos:nameservice [2021/02/20 12:07] – created coon | dryos:nameservice [2021/02/24 22:21] (current) – coon | ||
---|---|---|---|
Line 5: | Line 5: | ||
The inner workings are not well understood yet and needs some research. | The inner workings are not well understood yet and needs some research. | ||
+ | |||
+ | Code to dump all registred event functions with function pointer: | ||
+ | |||
+ | <code c> | ||
+ | typedef struct { | ||
+ | void* pStaticArg; | ||
+ | void* pFunction; | ||
+ | } EventProc; | ||
+ | |||
+ | typedef struct { | ||
+ | struct EventProcList* pNext; | ||
+ | EventProc* pProc; | ||
+ | char pName[64]; | ||
+ | } EventProcList; | ||
+ | |||
+ | typedef struct { | ||
+ | char* pName; | ||
+ | int numElements; | ||
+ | uint32_t semaphore; | ||
+ | uint32_t numLists; | ||
+ | uint32_t unknown_16; | ||
+ | uint32_t unknown_20; | ||
+ | struct EventProcList* pList; | ||
+ | } Service; | ||
+ | |||
+ | Service* pService = 0xc80080; | ||
+ | |||
+ | uart_printf(" | ||
+ | uart_printf(" | ||
+ | |||
+ | int traversedElems = 0; | ||
+ | |||
+ | for (int i = 0; i < pService-> | ||
+ | EventProcList* pCurListItem = (& | ||
+ | |||
+ | while (pCurListItem) { | ||
+ | uart_printf(" | ||
+ | pCurListItem = pCurListItem-> | ||
+ | |||
+ | ++traversedElems; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | uart_printf(" | ||
+ | uart_printf(" | ||
+ | </ |
dryos/nameservice.1613819253.txt.gz · Last modified: 2021/02/20 12:07 by coon