X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Fcurrent-thread.h;h=39c6ae228724d056eb5bcdf950e7ef1c5d27537f;hb=7b6afccb24b31e2feed787c2ed97809e797c3070;hp=65d32ec1830134c544b57e08806245ec7c7b80ff;hpb=924dc299c8a893e92fcd985fa05c245b591ef314;p=babeltrace.git diff --git a/include/babeltrace2/current-thread.h b/include/babeltrace2/current-thread.h index 65d32ec1..39c6ae22 100644 --- a/include/babeltrace2/current-thread.h +++ b/include/babeltrace2/current-thread.h @@ -2,7 +2,7 @@ #define BABELTRACE2_CURRENT_THREAD_H /* - * Copyright (c) 2019 Philippe Proulx + * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,19 +23,14 @@ * SOFTWARE. */ +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif + #include -/* - * For bt_error, bt_self_component, bt_self_component_class, and - * bt_self_message_iterator - */ #include -/* For __BT_FUNC_STATUS_* */ -#define __BT_FUNC_STATUS_ENABLE -#include -#undef __BT_FUNC_STATUS_ENABLE - #ifdef __cplusplus extern "C" { #endif @@ -91,13 +86,17 @@ bt_current_thread_error_append_cause_from_message_iterator( (_self_cc), __FILE__, __LINE__, (_msg_fmt), ##__VA_ARGS__) #define BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_MESSAGE_ITERATOR(_self_iter, _msg_fmt, ...) \ - bt_current_thread_error_append_cause_from_component( \ + bt_current_thread_error_append_cause_from_message_iterator( \ (_self_iter), __FILE__, __LINE__, (_msg_fmt), ##__VA_ARGS__) +#define BT_CURRENT_THREAD_MOVE_ERROR_AND_RESET(_var) \ + do { \ + bt_current_thread_move_error(_var); \ + (_var) = NULL; \ + } while (0) + #ifdef __cplusplus } #endif -#include - #endif /* BABELTRACE2_CURRENT_THREAD_H */