kernel: add c++ support
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
#include <socks/vm.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OBJECT_MAGIC 0xBADDCAFE
|
||||
#define OBJECT_NAME_MAX 64
|
||||
|
||||
@@ -19,7 +23,7 @@ typedef enum object_type_flags {
|
||||
typedef struct object_ops {
|
||||
kern_status_t(*open)(struct object *obj);
|
||||
kern_status_t(*close)(struct object *obj);
|
||||
kern_status_t(*delete)(struct object *obj);
|
||||
kern_status_t(*destroy)(struct object *obj);
|
||||
kern_status_t(*query_name)(struct object *obj, char out[OBJECT_NAME_MAX]);
|
||||
kern_status_t(*parse)(struct object *obj, const char *path, struct object **out);
|
||||
kern_status_t(*get_named)(struct object *obj, const char *name, struct object **out);
|
||||
@@ -89,4 +93,8 @@ extern bool object_is_set(object_t *obj);
|
||||
extern void init_set_objects(void);
|
||||
extern void init_global_namespace(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user