X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Flttng-ust-abi.c;h=5f4ba8916da496c0f0b0f5867a996e13fa9b39e1;hb=46050b1a32de8dd0a7b65347af630c4a77f433a1;hp=01512128f24b478e9bea2bef795ba89eb04e97b7;hpb=a4be89629a02fb95790eecf786c7f3b720c03a8e;p=lttng-ust.git diff --git a/libust/lttng-ust-abi.c b/libust/lttng-ust-abi.c index 01512128..5f4ba891 100644 --- a/libust/lttng-ust-abi.c +++ b/libust/lttng-ust-abi.c @@ -37,13 +37,6 @@ * by the caller. */ -struct obj; - -struct objd_ops { - long (*cmd)(int objd, unsigned int cmd, unsigned long arg); - int (*release)(int objd); -}; - struct obj { union { struct { @@ -131,10 +124,10 @@ void objd_set_private(int id, void *private_data) obj->u.s.private_data = private_data; } -static const struct objd_ops *objd_ops(int id) { struct obj *obj = _objd_get(id); + if (!obj) return NULL; return obj->u.s.ops; @@ -213,6 +206,15 @@ enum channel_type { METADATA_CHANNEL, }; +int lttng_abi_create_root_handle(void) +{ + int root_handle; + + root_handle = objd_alloc(NULL, <tng_ops); + assert(root_handle == 0); + return root_handle; +} + int lttng_abi_create_session(void) { struct ltt_session *session; @@ -355,7 +357,6 @@ create_error: return; /* not allowed to return error */ } -static int lttng_abi_create_channel(int session_objd, struct lttng_ust_channel *chan_param, enum channel_type channel_type)