-static const struct lttng_ust_objd_ops lttng_metadata_ops = {
- .release = lttng_channel_release,
- .cmd = lttng_metadata_cmd,
-};
-
-/**
- * lttng_rb_cmd - lttng ring buffer control through object descriptors
- *
- * @objd: the object descriptor
- * @cmd: the command
- * @arg: command arg
- *
- * This object descriptor implements lttng commands:
- * (None for now. Access is done directly though shm.)
- */
-static
-long lttng_rb_cmd(int objd, unsigned int cmd, unsigned long arg)
-{
- switch (cmd) {
- default:
- return -EINVAL;
- }
-}
-
-static
-int lttng_rb_release(int objd)
-{
- struct stream_priv_data *priv = objd_private(objd);
- struct lttng_ust_lib_ring_buffer *buf;
- struct ltt_channel *channel;
-
- if (priv) {
- buf = priv->buf;
- channel = priv->ltt_chan;
- free(priv);
- /*
- * If we are at ABI exit, we don't want to close the
- * buffer opened for read: it is being shared between
- * the parent and child (right after fork), and we don't
- * want the child to close it for the parent. For a real
- * exit, we don't care about marking it as closed, as
- * the consumer daemon (if there is one) will do fine
- * even if we don't mark it as "closed" for reading on
- * our side.
- * We only mark it as closed if it is being explicitely
- * released by the session daemon with an explicit
- * release command.
- */
- if (!lttng_ust_abi_close_in_progress)
- channel->ops->buffer_read_close(buf, channel->handle);
-
- return lttng_ust_objd_unref(channel->objd);
- }
- return 0;
-}
-
-static const struct lttng_ust_objd_ops lib_ring_buffer_objd_ops = {
- .release = lttng_rb_release,
- .cmd = lttng_rb_cmd,
-};
-