X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Fcurrent-thread.h;h=39c6ae228724d056eb5bcdf950e7ef1c5d27537f;hb=50e763f66f1e2016995f65c590bdbbae17b9b4ed;hp=125db20e1e1af00ce7f9695fd411577488975fdd;hpb=4fa90f321f51af8f5bfc48eee1435e2f41d853b3;p=babeltrace.git diff --git a/include/babeltrace2/current-thread.h b/include/babeltrace2/current-thread.h index 125db20e..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 @@ -29,10 +29,6 @@ #include -/* - * For bt_error, bt_self_component, bt_self_component_class, and - * bt_self_message_iterator - */ #include #ifdef __cplusplus @@ -90,9 +86,15 @@ 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