X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fchannel.h;h=62e202d2659fb00ad49cc6b14113f36b2035b0a4;hp=e20ed4f4fce981cff071482817ca5108677df026;hb=4bd69c5f1161cd065f487da0f4c1aa03a73c47e4;hpb=cf0bcb51ea857687a353d2851e572dba6cc63cb0 diff --git a/include/lttng/channel.h b/include/lttng/channel.h index e20ed4f4f..62e202d26 100644 --- a/include/lttng/channel.h +++ b/include/lttng/channel.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2014 - David Goulet + * Copyright (C) 2014 David Goulet * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_CHANNEL_H @@ -20,6 +10,7 @@ #include #include +#include #include #ifdef __cplusplus @@ -70,11 +61,11 @@ struct lttng_channel { /* */ -extern struct lttng_channel *lttng_channel_create(struct lttng_domain *domain); +LTTNG_EXPORT extern struct lttng_channel *lttng_channel_create(struct lttng_domain *domain); /* */ -extern void lttng_channel_destroy(struct lttng_channel *channel); +LTTNG_EXPORT extern void lttng_channel_destroy(struct lttng_channel *channel); /* * List the channel(s) of a session. @@ -84,7 +75,7 @@ extern void lttng_channel_destroy(struct lttng_channel *channel); * Return the size (number of entries) of the "lttng_channel" array. Caller * must free channels. On error, a negative LTTng error code is returned. */ -extern int lttng_list_channels(struct lttng_handle *handle, +LTTNG_EXPORT extern int lttng_list_channels(struct lttng_handle *handle, struct lttng_channel **channels); /* @@ -94,7 +85,7 @@ extern int lttng_list_channels(struct lttng_handle *handle, * * Return 0 on success else a negative LTTng error code. */ -extern int lttng_enable_channel(struct lttng_handle *handle, +LTTNG_EXPORT extern int lttng_enable_channel(struct lttng_handle *handle, struct lttng_channel *chan); /* @@ -104,7 +95,7 @@ extern int lttng_enable_channel(struct lttng_handle *handle, * * Return 0 on success else a negative LTTng error code. */ -extern int lttng_disable_channel(struct lttng_handle *handle, +LTTNG_EXPORT extern int lttng_disable_channel(struct lttng_handle *handle, const char *name); /* @@ -113,7 +104,7 @@ extern int lttng_disable_channel(struct lttng_handle *handle, * * If one or both arguments are NULL, nothing happens. */ -extern void lttng_channel_set_default_attr(struct lttng_domain *domain, +LTTNG_EXPORT extern void lttng_channel_set_default_attr(struct lttng_domain *domain, struct lttng_channel_attr *attr); /* @@ -121,7 +112,7 @@ extern void lttng_channel_set_default_attr(struct lttng_domain *domain, * * Returns 0 on success, or a negative LTTng error code on error. */ -extern int lttng_channel_get_discarded_event_count(struct lttng_channel *chan, +LTTNG_EXPORT extern int lttng_channel_get_discarded_event_count(struct lttng_channel *chan, uint64_t *discarded_events); /* @@ -129,15 +120,21 @@ extern int lttng_channel_get_discarded_event_count(struct lttng_channel *chan, * * Returns 0 on success, or a negative LTTng error code on error. */ -extern int lttng_channel_get_lost_packet_count(struct lttng_channel *chan, +LTTNG_EXPORT extern int lttng_channel_get_lost_packet_count(struct lttng_channel *chan, uint64_t *lost_packets); -extern int lttng_channel_get_monitor_timer_interval(struct lttng_channel *chan, +LTTNG_EXPORT extern int lttng_channel_get_monitor_timer_interval(struct lttng_channel *chan, uint64_t *monitor_timer_interval); -extern int lttng_channel_set_monitor_timer_interval(struct lttng_channel *chan, +LTTNG_EXPORT extern int lttng_channel_set_monitor_timer_interval(struct lttng_channel *chan, uint64_t monitor_timer_interval); +LTTNG_EXPORT extern int lttng_channel_get_blocking_timeout(struct lttng_channel *chan, + int64_t *blocking_timeout); + +LTTNG_EXPORT extern int lttng_channel_set_blocking_timeout(struct lttng_channel *chan, + int64_t blocking_timeout); + #ifdef __cplusplus } #endif