1 #ifndef RHESUS_DO_ASYNC_STATIC_H_
2 #define RHESUS_DO_ASYNC_STATIC_H_
6 #include "../Defines.h"
17 typedef INT32 (*AsyncMethodFuncPtr)(UINT32 p0, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5,
18 UINT32 p6, UINT32 p7);
20 typedef void (*AsyncCallbackFuncPtr)(INT32 retCode);
24 AsyncMethodFuncPtr mptr;
25 AsyncCallbackFuncPtr cptr;
37 static INT32 AsyncMethodWrapper(TaskStruct* t)
39 INT32 retCode = (t->mptr)(t->arg0, t->arg1, t->arg2, t->arg3, t->arg4, t->arg5, t->arg6, t->arg7);
50 do_async_static(AsyncMethodFuncPtr asyncFunc, AsyncCallbackFuncPtr callback = NULL, UINT32 p0 = 0, UINT32 p1 = 0, UINT32 p2 = 0, UINT32 p3 = 0, UINT32 p4 = 0, UINT32 p5 = 0,
51 UINT32 p6 = 0, UINT32 p7 = 0)
53 TaskPool::EnqueueTask((FUNCPTR)AsyncMethodWrapper, (UINT32)create(asyncFunc, callback, p0, p1, p2, p3, p4, p5, p6, p7));
57 TaskStruct* create(AsyncMethodFuncPtr mptr, AsyncCallbackFuncPtr cptr, UINT32 arg0, UINT32 arg1, UINT32 arg2,
58 UINT32 arg3, UINT32 arg4, UINT32 arg5, UINT32 arg6, UINT32 arg7)
60 TaskStruct* t =
new TaskStruct();