libmeinos: +llist2
[meinos.git] / apps / include / rpc.h
blobc6c6dda642baea3bb49d3d10c8c3c1e9e9387238
1 /*
2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _RPC_H_
20 #define _RPC_H_
22 #include <sys/cdefs.h>
23 #include <sys/types.h>
24 #include <limits.h>
25 #include <stdarg.h>
26 #include <llist.h>
28 #define RPC_SYNOPSIS_MAXLEN NAME_MAX
30 #define RPC_FLAG_RETPARAMS 1
31 #define RPC_FLAG_SENDTO 2
33 #define rpc_func(func,synopsis,paramsz) rpc_func_create(__STRING(func),func,synopsis,paramsz)
35 pid_t rpc_curpid;
37 int rpc_func_create(const char *name,void *func,const char *synopsis,size_t paramsz);
38 int rpc_func_destroy(int id);
39 int rpc_vcall(const char *name,int flags,va_list args);
40 int rpc_call(const char *name,int flags,...);
41 int rpc_vcallself(const char *name,void *func,int ret_params,va_list args);
42 int rpc_callself(const char *name,void *func,int ret_params,...);
43 int rpc_poll(int id);
44 int rpc_mainloop(int id);
45 llist_t rpc_list();
47 #endif