2014-10-19 23:51:49 +08:00
|
|
|
#ifndef __COMM_H
|
|
|
|
#define __COMM_H
|
|
|
|
|
2015-04-06 19:40:12 +08:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2014-10-19 23:51:49 +08:00
|
|
|
enum {
|
2015-04-05 22:04:50 +08:00
|
|
|
KERNEL_RUN_INVALID_STATUS,
|
|
|
|
|
|
|
|
KERNEL_RUN_FINISHED,
|
|
|
|
KERNEL_RUN_EXCEPTION,
|
|
|
|
KERNEL_RUN_STARTUP_FAILED
|
2014-10-19 23:51:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef int (*object_loader)(void *, int);
|
2015-04-05 22:04:50 +08:00
|
|
|
typedef int (*kernel_runner)(const char *, int *, long long int *);
|
2014-10-19 23:51:49 +08:00
|
|
|
|
|
|
|
void comm_serve(object_loader load_object, kernel_runner run_kernel);
|
2015-04-06 22:28:10 +08:00
|
|
|
void comm_rpc_va(int rpc_num, va_list args, int *eid, int *retval);
|
2014-12-19 12:46:24 +08:00
|
|
|
int comm_rpc(int rpc_num, ...);
|
2015-04-06 19:40:12 +08:00
|
|
|
void comm_log_va(const char *fmt, va_list args);
|
2014-10-19 23:51:49 +08:00
|
|
|
void comm_log(const char *fmt, ...);
|
|
|
|
|
|
|
|
#endif /* __COMM_H */
|