X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Ftrace-ir%2Fclock-class-const.h;h=efc27060839a5e73c025b3616f27209e3c5afe59;hb=4fa90f321f51af8f5bfc48eee1435e2f41d853b3;hp=a06241c22942bf089377a17a84c5be99ccf72c2c;hpb=3fadfbc0c91f82c46bd36e6e0657ea93570c9db1;p=babeltrace.git diff --git a/include/babeltrace2/trace-ir/clock-class-const.h b/include/babeltrace2/trace-ir/clock-class-const.h index a06241c2..efc27060 100644 --- a/include/babeltrace2/trace-ir/clock-class-const.h +++ b/include/babeltrace2/trace-ir/clock-class-const.h @@ -1,5 +1,5 @@ -#ifndef BABELTRACE_TRACE_IR_CLOCK_CLASS_CONST_H -#define BABELTRACE_TRACE_IR_CLOCK_CLASS_CONST_H +#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_CONST_H +#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_CONST_H /* * Copyright 2017-2018 Philippe Proulx @@ -27,6 +27,10 @@ * http://www.efficios.com/ctf */ +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif + #include /* For bt_bool, bt_uuid, bt_clock_class */ @@ -36,12 +40,6 @@ extern "C" { #endif -typedef enum bt_clock_class_status { - BT_CLOCK_CLASS_STATUS_OK = 0, - BT_CLOCK_CLASS_STATUS_NOMEM = -12, - BT_CLOCK_CLASS_STATUS_OVERFLOW = -75, -} bt_clock_class_status; - extern const char *bt_clock_class_get_name( const bt_clock_class *clock_class); @@ -63,7 +61,13 @@ extern bt_bool bt_clock_class_origin_is_unix_epoch( extern bt_uuid bt_clock_class_get_uuid( const bt_clock_class *clock_class); -extern bt_clock_class_status bt_clock_class_cycles_to_ns_from_origin( +typedef enum bt_clock_class_cycles_to_ns_from_origin_status { + BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW = __BT_FUNC_STATUS_OVERFLOW, + BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK = __BT_FUNC_STATUS_OK, +} bt_clock_class_cycles_to_ns_from_origin_status; + +extern bt_clock_class_cycles_to_ns_from_origin_status +bt_clock_class_cycles_to_ns_from_origin( const bt_clock_class *clock_class, uint64_t cycles, int64_t *ns_from_origin); @@ -88,4 +92,4 @@ extern void bt_clock_class_put_ref(const bt_clock_class *clock_class); } #endif -#endif /* BABELTRACE_TRACE_IR_CLOCK_CLASS_CONST_H */ +#endif /* BABELTRACE2_TRACE_IR_CLOCK_CLASS_CONST_H */