X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fbytecode%2Fbytecode.h;h=54ed7363ec493b6c0c2b14db940d2402edf6ccf4;hb=7966af5763c4aaca39df9bbfa9277ff15715c720;hp=7e9b9f09edf168ed04bfdb2ebad067df9e609480;hpb=d0cede2590e42c3be77e9434e3de36d86eed07dd;p=lttng-tools.git diff --git a/src/common/bytecode/bytecode.h b/src/common/bytecode/bytecode.h index 7e9b9f09e..54ed7363e 100644 --- a/src/common/bytecode/bytecode.h +++ b/src/common/bytecode/bytecode.h @@ -13,6 +13,10 @@ #include "common/macros.h" #include "common/sessiond-comm/sessiond-comm.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * offsets are absolute from start of bytecode. */ @@ -43,10 +47,6 @@ struct literal_double { double v; } LTTNG_PACKED; -struct literal_string { - char string[0]; -} LTTNG_PACKED; - enum bytecode_op { BYTECODE_OP_UNKNOWN = 0, @@ -234,24 +234,24 @@ struct lttng_bytecode_alloc { struct lttng_bytecode b; }; -LTTNG_HIDDEN int bytecode_init(struct lttng_bytecode_alloc **fb); -LTTNG_HIDDEN int bytecode_push(struct lttng_bytecode_alloc **fb, +int bytecode_init(struct lttng_bytecode_alloc **fb); +int bytecode_push(struct lttng_bytecode_alloc **fb, const void *data, uint32_t align, uint32_t len); -LTTNG_HIDDEN int bytecode_push_logical(struct lttng_bytecode_alloc **fb, +int bytecode_push_logical(struct lttng_bytecode_alloc **fb, struct logical_op *data, uint32_t align, uint32_t len, uint16_t *skip_offset); -LTTNG_HIDDEN struct lttng_bytecode *lttng_bytecode_copy( +struct lttng_bytecode *lttng_bytecode_copy( const struct lttng_bytecode *orig_f); -LTTNG_HIDDEN int bytecode_push_get_payload_root( +int bytecode_push_get_payload_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_context_root( +int bytecode_push_get_context_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_app_context_root( +int bytecode_push_get_app_context_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_index_u64( +int bytecode_push_get_index_u64( struct lttng_bytecode_alloc **bytecode, uint64_t index); -LTTNG_HIDDEN int bytecode_push_get_symbol( +int bytecode_push_get_symbol( struct lttng_bytecode_alloc **bytecode, struct lttng_bytecode_alloc **bytecode_reloc, const char *symbol); @@ -262,4 +262,8 @@ unsigned int bytecode_get_len(struct lttng_bytecode *bytecode) return bytecode->len; } +#ifdef __cplusplus +} +#endif + #endif /* LTTNG_COMMON_BYTECODE_H */