#include <sys/types.h>
#include <urcu/ref.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_rate_policy;
struct mi_writer;
struct mi_lttng_error_query_callbacks;
*error_query_callbacks,
struct lttng_dynamic_array *action_path_indexes);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_ACTION_INTERNAL_H */
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_action;
struct lttng_payload_view;
struct mi_writer;
*error_query_callbacks,
struct lttng_dynamic_array *action_path_indexes);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_ACTION_LIST_INTERNAL_H */
#include <common/payload.h>
#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_action_path {
struct lttng_dynamic_array indexes;
};
int lttng_action_path_serialize(const struct lttng_action_path *action_path,
struct lttng_payload *payload);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_ACTION_PATH_INTERNAL_H */
#include <stdbool.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct mi_writer;
int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
const struct lttng_rate_policy *policy,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_RATE_POLICY */
#include "common/buffer-view.h"
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_condition_buffer_usage {
struct lttng_condition parent;
struct {
struct lttng_payload_view *view,
struct lttng_evaluation **evaluation);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CONDITION_BUFFER_USAGE_INTERNAL_H */
#include <urcu/list.h>
#include <urcu/ref.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
struct mi_writer;
struct mi_lttng_error_query_callbacks;
struct lttng_trigger;
const char *lttng_condition_type_str(enum lttng_condition_type type);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_CONDITION_INTERNAL_H */
#include <common/dynamic-array.h>
#include <lttng/event-field-value.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_capture_descriptor {
struct lttng_event_expr *event_expression;
struct lttng_bytecode *bytecode;
lttng_condition_event_rule_matches_get_capture_bytecode_at_index(
const struct lttng_condition *condition, unsigned int index);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CONDITION_EVENT_RULE_MATCHES_INTERNAL_H */
#include <common/buffer-view.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct lttng_payload_view *view,
struct lttng_evaluation **evaluation);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CONDITION_SESSION_CONSUMED_SIZE_INTERNAL_H */
#include <lttng/location.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_condition_session_rotation {
struct lttng_condition parent;
char *session_name;
struct lttng_payload_view *view,
struct lttng_evaluation **evaluation);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H */
#include "lttng/domain.h"
#include "common/macros.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
const char *lttng_domain_type_str(enum lttng_domain_type domain_type);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_DOMAIN_INTERNAL_H */
#include <common/payload.h>
#include <common/payload-view.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct mi_writer;
enum lttng_error_query_target_type {
const struct lttng_error_query_results *results,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_ERROR_QUERY_INTERNAL_H */
#include <common/macros.h>
#include <lttng/event-expr.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_bytecode;
struct mi_writer;
const struct lttng_event_expr *expression,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_EVENT_EXPR_INTERNAL_H */
#include <common/macros.h>
#include <lttng/event.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_userspace_probe_location;
struct lttng_event_extended {
struct lttng_event *lttng_event_copy(const struct lttng_event *event);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_EVENT_INTERNAL_H */
#include <sys/types.h>
#include <urcu/ref.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct mi_writer;
enum lttng_error_code lttng_event_rule_mi_serialize(
const struct lttng_event_rule *rule, struct mi_writer *writer);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_EVENT_RULE_INTERNAL_H */
#include <lttng/event-rule/event-rule-internal.h>
#include <lttng/event-rule/kernel-syscall.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
struct lttng_event_rule_kernel_syscall {
struct lttng_event_rule parent;
enum lttng_event_rule_kernel_syscall_emission_site emission_site;
const char *lttng_event_rule_kernel_syscall_emission_site_str(
enum lttng_event_rule_kernel_syscall_emission_site emission_site);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_EVENT_RULE_KERNEL_SYSCALL_INTERNAL_H */
#include <lttng/health.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* These are the value added to the current state depending of the position in
* the thread where is either waiting on a poll() or running in the code.
void health_register(struct health_app *ha, int type);
void health_unregister(struct health_app *ha);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* HEALTH_INTERNAL_H */
#include <stdint.h>
#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct lttng_dynamic_buffer;
const struct lttng_kernel_probe_location *location,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_KERNEL_PROBE_INTERNAL_H */
#include <sys/types.h>
#include <urcu/ref.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* The public API assumes that trace archive locations are always
* provided as "constant". This means that the user of liblttng-ctl never
void lttng_trace_archive_location_put(
struct lttng_trace_archive_location *location);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_LOCATION_INTERNAL_H */
#include <lttng/log-level-rule.h>
#include <lttng/lttng-error.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct mi_writer;
/*
const struct lttng_log_level_rule *rule,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_LOG_LEVEL_RULE_INTERNAL_H */
#include <stdbool.h>
#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct lttng_payload_view *view,
struct lttng_notification **notification);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_NOTIFICATION_INTERNAL_H */
#include <common/buffer-view.h>
#include <stdbool.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Note that these enums are used as part of the lttnctl protocol. */
enum lttng_session_descriptor_type {
LTTNG_SESSION_DESCRIPTOR_TYPE_UNKNOWN = -1,
struct lttng_session_descriptor *dst_descriptor,
const struct lttng_session_descriptor *src_descriptor);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_SESSION_DESCRIPTOR_INTERNAL_H */
#include <sys/types.h>
#include <urcu/ref.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct mi_writer;
enum lttng_trigger_status lttng_trigger_set_name(
struct lttng_trigger *trigger, const char *name);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_TRIGGER_INTERNAL_H */
#include <common/fd-handle.h>
#include <stdbool.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_payload;
struct lttng_payload_view;
struct lttng_dynamic_buffer;
const struct lttng_userspace_probe_location *location,
struct mi_writer *writer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_USERSPACE_PROBE_INTERNAL_H */
#include <lttng/condition/condition.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* The lttng_condition hashing code is kept in this file (rather than
* condition.c) since it makes use of GPLv2 code (hashtable utils), which we
struct lttng_condition *lttng_condition_copy(
const struct lttng_condition *condition);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_SESSIOND_CONDITION_INTERNAL_H */
#include "lttng-ust-abi.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifndef LTTNG_UST_UUID_LEN
#define LTTNG_UST_UUID_LEN 16
#endif
void lttng_ust_ctl_sigbus_handle(void *addr);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_UST_CTL_INTERNAL_H */
#include <lttng/lttng.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel);
bool loglevel_parse_range_string(const char *str,
const char *loglevel_python_value_to_name(int loglevel);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTNG_LOGLEVEL_UTILS_H */
#include <stddef.h>
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_dynamic_buffer;
struct lttng_buffer_view {
const char *str,
size_t len_with_null_terminator);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_BUFFER_VIEW_H */
#include "common/macros.h"
#include "common/sessiond-comm/sessiond-comm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* offsets are absolute from start of bytecode.
*/
return bytecode->len;
}
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_COMMON_BYTECODE_H */
#include <sys/stat.h>
#include <urcu/ref.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum lttng_directory_handle_rmdir_recursive_flags {
LTTNG_DIRECTORY_HANDLE_FAIL_NON_EMPTY_FLAG = (1U << 0),
LTTNG_DIRECTORY_HANDLE_SKIP_NON_EMPTY_FLAG = (1U << 1),
const struct lttng_directory_handle *rhs);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _COMPAT_PATH_HANDLE_H */
#include <common/compat/errno.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#if (defined(__CYGWIN__))
typedef long long off64_t;
#endif
#error "Please add support for your OS."
#endif /* __linux__ , __FreeBSD__, __CYGWIN__, __sun__, __APPLE__ */
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _COMPAT_FCNTL_H */
#include <common/common.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Used by lttng_poll_clean to free the events structure in a lttng_poll_event.
*/
free(events);
}
-#ifdef __cplusplus
-}
-#endif
-
/*
* epoll(7) implementation.
*/
#include <features.h>
#include <common/compat/fcntl.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* See man epoll(7) for this define path */
#define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
__lttng_poll_free((void *) events->events);
}
-#ifdef __cplusplus
-}
-#endif
-
#else /* HAVE_EPOLL */
/*
* Fallback on poll(2) API
#include <poll.h>
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum {
/* Polling variables compatibility for poll */
LPOLLIN = POLLIN,
}
}
-#ifdef __cplusplus
-}
-#endif
-
#endif /* HAVE_EPOLL */
#endif /* _LTT_POLL_H */
#define __INI_H__
/* Make this header file easier to include in C++ code */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdio.h>
typedef int (*ini_entry_handler)(void *, const char *, const char *,
#define INI_MAX_LINE 200
#endif
-#ifdef __cplusplus
-}
-#endif
-
#endif /* __INI_H__ */
#include <common/macros.h>
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct config_entry {
/* section is NULL if the entry is not in a section */
const char *section;
int overwrite, unsigned int autoload,
const struct config_load_session_override_attr *overrides);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _CONFIG_H */
#include <common/consumer/consumer.h>
#include <common/dynamic-buffer.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum consumer_metadata_cache_write_status {
CONSUMER_METADATA_CACHE_WRITE_STATUS_ERROR = -1,
/*
int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel,
uint64_t offset, int timer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* CONSUMER_METADATA_CACHE_H */
#include "consumer.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum consumer_stream_open_packet_status {
CONSUMER_STREAM_OPEN_PACKET_STATUS_OPENED,
CONSUMER_STREAM_OPEN_PACKET_STATUS_NO_SPACE,
int consumer_stream_flush_buffer(struct lttng_consumer_stream *stream,
bool producer_active);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CONSUMER_STREAM_H */
#include "consumer.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define LTTNG_CONSUMER_SIG_SWITCH SIGRTMIN + 10
#define LTTNG_CONSUMER_SIG_TEARDOWN SIGRTMIN + 11
#define LTTNG_CONSUMER_SIG_LIVE SIGRTMIN + 12
int consumer_timer_thread_get_channel_monitor_pipe(void);
int consumer_timer_thread_set_channel_monitor_pipe(int fd);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* CONSUMER_TIMER_H */
#include <common/buffer-view.h>
#include <common/dynamic-array.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_consumer_local_data;
/* Commands for consumer */
int consumer_metadata_wakeup_pipe(const struct lttng_consumer_channel *channel);
void lttng_consumer_sigbus_handle(void *addr);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LIB_CONSUMER_H */
#include <common/consumer/consumer.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct metadata_bucket;
typedef ssize_t (*metadata_bucket_flush_cb)(
void metadata_bucket_reset(struct metadata_bucket *bucket);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* METADATA_BUCKET_H */
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Parse string as an application context of the form
* "$app.provider_name:context_name" and return the provider name and context
int parse_application_context(const char *str, char **provider_name,
char **ctx_name);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_COMMON_CONTEXT_H */
#include "optional.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_credentials {
LTTNG_OPTIONAL(uid_t) uid;
LTTNG_OPTIONAL(gid_t) gid;
bool lttng_credentials_is_equal(const struct lttng_credentials *a,
const struct lttng_credentials *b);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_CREDENTIALS_H */
#include <unistd.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Daemonize this process by forking and making the parent wait for the child
* to signal it indicating readiness. Once received, the parent successfully
int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
int close_fds);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_DAEMONIZE_H */
#include <pthread.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Default unix group name for tracing. */
#define DEFAULT_TRACING_GROUP "tracing"
*/
pthread_attr_t *default_pthread_attr(void);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _DEFAULTS_H */
#include <common/dynamic-buffer.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
typedef void (*lttng_dynamic_array_element_destructor)(void *element);
typedef void (*lttng_dynamic_pointer_array_destructor)(void *ptr);
void lttng_dynamic_pointer_array_clear(
struct lttng_dynamic_pointer_array *array);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_DYNAMIC_ARRAY_H */
#include <stdint.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_buffer_view;
struct lttng_dynamic_buffer {
size_t lttng_dynamic_buffer_get_capacity_left(
struct lttng_dynamic_buffer *buffer);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_DYNAMIC_BUFFER_H */
#include <lttng/lttng-error.h>
#include <common/compat/tid.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
/* Avoid conflict with Solaris <sys/regset.h> */
#if defined(ERR) && defined(__sun__)
#undef ERR
/* Name must be a statically-allocated string. */
void logger_set_thread_name(const char *name, bool set_pthread_name);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _ERROR_H */
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Wrapper around a file descriptor providing reference counting semantics.
*
*/
struct fd_handle *fd_handle_copy(const struct fd_handle *handle);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* FS_HANDLE_H */
#include <stdint.h>
#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct fs_handle;
struct fd_tracker;
*/
void fd_tracker_log(struct fd_tracker *tracker);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* FD_TRACKER_H */
#include <common/fd-tracker/fd-tracker.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_poll_event;
/*
struct lttng_directory_handle *handle,
const char *path);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* FD_TRACKER_UTILS_H */
#include <common/sessiond-comm/sessiond-comm.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct bytecode_symbol_iterator;
/*
void bytecode_symbol_iterator_destroy(struct bytecode_symbol_iterator *it);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_COMMON_FILTER_H */
#include <stdio.h>
#include <stdint.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
#define printf_debug(fmt, args...) \
do { \
if (filter_parser_debug) \
int filter_visitor_ir_normalize_glob_patterns(struct filter_parser_ctx *ctx);
int filter_visitor_ir_validate_globbing(struct filter_parser_ctx *ctx);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _FILTER_AST_H */
#include <common/macros.h>
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct fs_handle;
/*
off_t fs_handle_seek(struct fs_handle *handle, off_t offset, int whence);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* FS_HANDLE_H */
#ifndef _LTT_FUTEX_H
#define _LTT_FUTEX_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
void futex_wait_update(int32_t *futex, int active);
void futex_nto1_prepare(int32_t *futex);
void futex_nto1_wait(int32_t *futex);
void futex_nto1_wake(int32_t *futex);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTT_FUTEX_H */
#include <lttng/lttng-export.h>
#include <urcu/rculfhash.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
LTTNG_EXPORT extern unsigned long lttng_ht_seed;
typedef unsigned long (*hash_fct_type)(const void *_key, unsigned long seed);
struct lttng_ht_node_two_u64 *lttng_ht_iter_get_node_two_u64(
struct lttng_ht_iter *iter);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTT_HT_H */
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
unsigned long hash_key_ulong(const void *_key, unsigned long seed);
unsigned long hash_key_u64(const void *_key, unsigned long seed);
unsigned long hash_key_str(const void *key, unsigned long seed);
int hash_match_key_str(const void *key1, const void *key2);
int hash_match_key_two_u64(const void *key1, const void *key2);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTT_HT_UTILS_H */
#include <inttypes.h>
#include <lttng/lttng-export.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_index_allocator;
enum lttng_index_allocator_status {
/*
* Create an index allocator of `index_count` slots.
*/
-LTTNG_EXPORT struct lttng_index_allocator *lttng_index_allocator_create(
+extern "C" LTTNG_EXPORT
+struct lttng_index_allocator *lttng_index_allocator_create(
uint64_t index_count);
/*
* Get the number of indexes currently in use.
*/
-LTTNG_EXPORT uint64_t lttng_index_allocator_get_index_count(
+extern "C" LTTNG_EXPORT
+uint64_t lttng_index_allocator_get_index_count(
struct lttng_index_allocator *allocator);
/*
* Allocate (i.e. reserve) a slot.
*/
-LTTNG_EXPORT enum lttng_index_allocator_status lttng_index_allocator_alloc(
+extern "C" LTTNG_EXPORT
+enum lttng_index_allocator_status lttng_index_allocator_alloc(
struct lttng_index_allocator *allocator,
uint64_t *index);
* Release a slot by index. The slot will be re-used by the index allocator
* in future 'alloc' calls.
*/
-LTTNG_EXPORT enum lttng_index_allocator_status lttng_index_allocator_release(
+extern "C" LTTNG_EXPORT
+enum lttng_index_allocator_status lttng_index_allocator_release(
struct lttng_index_allocator *allocator, uint64_t index);
/*
* Destroy an index allocator.
*/
-LTTNG_EXPORT void lttng_index_allocator_destroy(struct lttng_index_allocator *allocator);
-
-#ifdef __cplusplus
-}
-#endif
+extern "C" LTTNG_EXPORT
+void lttng_index_allocator_destroy(struct lttng_index_allocator *allocator);
#endif /* _COMMON_INDEX_ALLOCATOR_H */
#include <common/fs-handle.h>
#include <common/trace-chunk.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_index_file {
struct fs_handle *file;
uint32_t major;
void lttng_index_file_get(struct lttng_index_file *index_file);
void lttng_index_file_put(struct lttng_index_file *index_file);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _INDEX_H */
#include <stdbool.h>
#include <common/consumer/consumer.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int lttng_kconsumer_take_snapshot(struct lttng_consumer_stream *stream);
int lttng_kconsumer_sample_snapshot_positions(
struct lttng_consumer_stream *stream);
enum sync_metadata_status lttng_kconsumer_sync_metadata(
struct lttng_consumer_stream *metadata);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTNG_KCONSUMER_H */
#include <common/lttng-kernel-old.h>
#include <common/sessiond-comm/sessiond-comm.h> /* for struct lttng_filter_bytecode */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int kernctl_create_session(int fd);
int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops);
int kernctl_create_channel(int fd, struct lttng_channel_attr *chops);
int kernctl_get_sequence_number(int fd, uint64_t *seq);
int kernctl_get_instance_id(int fd, uint64_t *seq);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTNG_KERNEL_CTL_H */
})
#endif
-
-/*
- * The min and max macros are not needed in C++ (std::min and std::max are
- * preferred) and they conflict with some C++ header file. Don't define them
- * when compiling C++ source.
- */
-#ifndef __cplusplus
-
-# ifndef max
-# define max(a, b) ((a) > (b) ? (a) : (b))
-# endif
-
-# ifndef min
-# define min(a, b) ((a) < (b) ? (a) : (b))
-# endif
-
-# ifndef max_t
-# define max_t(type, a, b) max((type) a, (type) b)
-# endif
-
-# ifndef min_t
-# define min_t(type, a, b) min((type) a, (type) b)
-# endif
-
-#endif
-
#ifndef LTTNG_PACKED
#define LTTNG_PACKED __attribute__((__packed__))
#endif
#include <common/config/session-config.h>
#include <lttng/lttng.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
/* Don't want to reference snapshot-internal.h here */
struct lttng_snapshot_output;
enum lttng_rotation_state rotation_state,
const struct lttng_trace_archive_location *location);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _MI_LTTNG_H */
#include <common/buffer-view.h>
#include <common/dynamic-array.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_payload;
struct fd_handle;
struct lttng_buffer_view buffer;
/* private */
- /*
- * Avoid a -Wreturn-type-c-linkage warning with clang.
- * gcc is more permissive with regards to this warning, but
- * clang is right that a structure containing a _const_ structure is not
- * a trivial type in the eyes of the C++ standard, theoritically affecting its
- * compatibility with C from an ABI standpoint:
- * A trivial class is a class that is trivially copyable and has one or
- * more default constructors, all of which are either trivial or deleted and
- * at least one of which is not deleted.
- *
- * A const member implicitly deletes lttng_payload_view's constructor,
- * making it non-trivial. This is not a problem for the moment as we are
- * transitioning all code to C++11.
- */
-#if !defined(__cplusplus)
- const
-#endif
- struct lttng_dynamic_pointer_array _fd_handles;
+ const struct lttng_dynamic_pointer_array _fd_handles;
struct {
size_t *p_fd_handles_position;
struct fd_handle *lttng_payload_view_pop_fd_handle(
struct lttng_payload_view *payload_view);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_PAYLOAD_VIEW_H */
#include <common/dynamic-array.h>
#include <common/fd-handle.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* An lttng_payload encompasses the 'data' (bytes) and any passed file
* descriptors as part of a message between liblttng-ctl and the session
int lttng_payload_push_fd_handle(struct lttng_payload *payload,
struct fd_handle *fd_handle);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_PAYLOAD_H */
#include <common/macros.h>
#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum lttng_pipe_state {
LTTNG_PIPE_STATE_OPENED = 1,
LTTNG_PIPE_STATE_CLOSED = 2,
/* Returns and releases the write end of the pipe. */
int lttng_pipe_release_writefd(struct lttng_pipe *pipe);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_PIPE_H */
#include <unistd.h>
#include <common/macros.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* lttng_read and lttng_write take care of EINTR and partial read/write.
* Upon success, they return the "count" received as parameter.
ssize_t lttng_read(int fd, void *buf, size_t count);
ssize_t lttng_write(int fd, const void *buf, size_t count);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_COMMON_READWRITE_H */
#include <common/trace-chunk.h>
#include <common/dynamic-array.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct relayd_stream_rotation_position {
uint64_t stream_id;
/*
uint64_t query_flags,
uint64_t *result_flags);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _RELAYD_H */
#include <common/macros.h>
#include <common/sessiond-comm/sessiond-comm.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* The run-as process is launched by forking without an exec*() call. This means
* that any resource allocated before the run-as worker is launched should be
post_fork_cleanup_cb clean_up_func, void *clean_up_user_data);
void run_as_destroy_worker(void);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _RUNAS_H */
#include "sessiond-comm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* See man tcp(7) for more detail about this value. */
#define LTTCOMM_INET_PROC_SYN_RETRIES_PATH "/proc/sys/net/ipv4/tcp_syn_retries"
#define LTTCOMM_INET_PROC_FIN_TIMEOUT_PATH "/proc/sys/net/ipv4/tcp_fin_timeout"
/* Initialize inet communication layer. */
extern void lttcomm_inet_init(void);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTCOMM_INET_H */
#include "inet6.h"
#include <common/unix.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Queue size of listen(2) */
#define LTTNG_SESSIOND_COMM_MAX_LISTEN 64
/* Get network timeout, in milliseconds */
unsigned long lttcomm_get_network_timeout(void);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTNG_SESSIOND_COMM_H */
#ifndef _LTT_SHM_H
#define _LTT_SHM_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
char *shm_ust_get_mmap(char *shm_path, int global);
int shm_create_anonymous(const char *owner_name);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTT_SHM_H */
#include <lttng/lttng-export.h>
#include <stdbool.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
/*
* Read the trace by `exec()ing` the provided viewer program if any. If
* `opt_viewer` is NULL, try to read the trace with the default trace reader.
* This symbol was mistakenly made public before the 2.12 release. It can't
* be removed (but it can be stubbed-out if necessary).
*/
-LTTNG_EXPORT int spawn_viewer(const char *trace_path, char *opt_viewer, bool opt_live_mode);
-
-#if defined(__cplusplus)
-}
-#endif
+extern "C" LTTNG_EXPORT
+int spawn_viewer(const char *trace_path, char *opt_viewer, bool opt_live_mode);
#endif /* ifndef LTTNG_SPAWN_VIEWER_H */
#include <common/macros.h>
#include <common/dynamic-array.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
void strutils_normalize_star_glob_pattern(char *pattern);
bool strutils_is_star_glob_pattern(const char *pattern);
size_t strutils_array_of_strings_len(char * const *array);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _STRING_UTILS_H */
#include <urcu.h> /* for caa_likely/unlikely */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
extern int lttng_testpoint_activated;
void *lttng_testpoint_lookup(const char *name);
#define TESTPOINT_DECL(name) \
_TESTPOINT_DECL(name)
-#ifdef __cplusplus
-}
-#endif
-
#endif /* NTESTPOINT */
#include <common/macros.h>
#include <common/compat/time.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
#define MSEC_PER_SEC 1000ULL
#define NSEC_PER_SEC 1000000000ULL
#define NSEC_PER_MSEC 1000000ULL
int time_to_datetime_str(time_t time, char *str, size_t len);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_TIME_H */
#include <common/macros.h>
#include <common/trace-chunk.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_trace_chunk_registry;
/*
unsigned int lttng_trace_chunk_registry_put_each_chunk(
const struct lttng_trace_chunk_registry *registry);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_TRACE_CHUNK_REGISTRY_H */
#include <stddef.h>
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* A trace chunk is a group of directories and files forming a (or a set of)
* complete and independant trace(s). For instance, a trace archive chunk,
void lttng_trace_chunk_put(struct lttng_trace_chunk *chunk);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_TRACE_CHUNK_H */
#include <common/macros.h>
#include <common/sessiond-comm/sessiond-comm.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
struct process_attr_value {
enum lttng_process_attr_value_type type;
union value {
const struct lttng_buffer_view *value_view,
struct process_attr_value **value);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* LTTNG_COMMON_TRACKER_H */
#include <common/payload.h>
#include <common/payload-view.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int lttcomm_create_unix_sock(const char *pathname);
int lttcomm_create_anon_unix_socketpair(int *fds);
int lttcomm_connect_unix_sock(const char *pathname);
int lttcomm_setsockopt_creds_unix_sock(int sock);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTCOMM_UNIX_H */
#include <lttng/lttng.h>
#include <common/macros.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
/* Destination type of lttng URI */
enum lttng_dst_type {
LTTNG_DST_IPV4 = 1,
struct lttng_uri **uris);
int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _LTT_URI_H */
#include <common/consumer/consumer.h>
#include <stdbool.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifdef HAVE_LIBLTTNG_UST_CTL
int lttng_ustconsumer_take_snapshot(struct lttng_consumer_stream *stream);
}
#endif /* HAVE_LIBLTTNG_UST_CTL */
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _LTTNG_USTCONSUMER_H */
#include <common/compat/directory-handle.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
#define KIBI_LOG2 10
#define MEBI_LOG2 20
#define GIBI_LOG2 30
int utils_parse_unsigned_long_long(const char *str,
unsigned long long *value);
-#if defined(__cplusplus)
-}
-#endif
-
#endif /* _COMMON_UTILS_H */
#include <stdint.h>
#include <inttypes.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Includes final \0.
*/
*/
int lttng_uuid_generate(lttng_uuid uuid_out);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_UUID_H */
#include <stdbool.h>
#include "macros.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct lttng_waiter {
struct cds_wfs_node wait_queue_node;
int32_t state;
*/
void lttng_waiter_wake_up(struct lttng_waiter *waiter);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* LTTNG_WAITER_H */