add IPC errors && fix build errors
This commit is contained in:
@@ -147,7 +147,7 @@ static const luaL_Reg syscalls_IPC_msg_m[] = {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
struct registers* syscalls_pushIPC_msg(lua_State* L, size_t dataLen)
|
||||
ksys_ipc_msg* syscalls_pushIPC_msg(lua_State* L, size_t dataLen)
|
||||
{
|
||||
DEBUG_LINE("push IPC_msg entry");
|
||||
|
||||
|
@@ -7,9 +7,7 @@
|
||||
#define syscalls_IPC_msg_metatable_name "syscalls IPC_msg metatable"
|
||||
#define syscalls_IPC_msg_name "IPC_msg"
|
||||
|
||||
int syscalls_newIPC_msg(lua_State* L);
|
||||
|
||||
ksys_colors_table_t* syscalls_pushIPC_msg(lua_State* L);
|
||||
ksys_ipc_msg* syscalls_pushIPC_msg(lua_State* L, size_t dataLen);
|
||||
|
||||
/**
|
||||
* Register SystemColors lib
|
||||
|
@@ -9,10 +9,24 @@ enum SendIPCErrors
|
||||
BufferNotDefined = 1,
|
||||
BufferLocked = 2,
|
||||
BufferOverflow = 3,
|
||||
PidNotExist = 4
|
||||
PIDNotExist = 4
|
||||
};
|
||||
|
||||
int syscalls_DefineIPCBuffer(lua_State* L);
|
||||
int syscalls_SendIPCMessage(lua_State* L);
|
||||
|
||||
|
||||
inline void syscalls_push_IPC_errors(lua_State* L)
|
||||
{
|
||||
lua_createtable(L, 0, 5);
|
||||
|
||||
LUA_PUSH_INTEGER_FIELD(L, Ok, "Ok");
|
||||
LUA_PUSH_INTEGER_FIELD(L, BufferLocked, "BufferLocked");
|
||||
LUA_PUSH_INTEGER_FIELD(L, BufferNotDefined, "BufferNotDefined");
|
||||
LUA_PUSH_INTEGER_FIELD(L, BufferOverflow, "BufferOverflow");
|
||||
LUA_PUSH_INTEGER_FIELD(L, PIDNotExist, "PIDNotExist");
|
||||
|
||||
lua_setfield(L, -2, "IPCError");
|
||||
}
|
||||
|
||||
#endif // __IPC_H__
|
@@ -1629,6 +1629,7 @@ static const luaL_Reg syscallsLib[] = {
|
||||
{ "Done", syscalls_Done },
|
||||
{ "DefineBreakpoint", syscalls_DefineBreakpoint },
|
||||
{ "UndefBreakpoint", syscalls_UndefBreakpoint },
|
||||
/* IPC */
|
||||
{ "DefineIPCBuffer", syscalls_DefineIPCBuffer },
|
||||
{ "SendIPCMessage", syscalls_SendIPCMessage },
|
||||
{ NULL, NULL }
|
||||
@@ -1788,6 +1789,7 @@ LUALIB_API int luaopen_syscalls(lua_State* L)
|
||||
syscalls_push_connectionStatus(L);
|
||||
syscalls_push_graphic(L);
|
||||
syscalls_register_IPC_msg(L);
|
||||
syscalls_push_IPC_errors(L);
|
||||
|
||||
syscalls_register_ARPEntry(L);
|
||||
syscalls_register_SystemColors(L);
|
||||
|
Reference in New Issue
Block a user