X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ftestpoint%2Ftestpoint.h;h=b613b1749dab4d4258bffc0857ad745d4883fe74;hb=3afa94aeca5a0daae40fd7b6cc96b7e4c150c7d8;hp=dc5be832b04b7dfb8696802e7179860345e16274;hpb=6993eeb37fb4caf9b92c09d4ab1730dcc2b8b097;p=lttng-tools.git diff --git a/src/common/testpoint/testpoint.h b/src/common/testpoint/testpoint.h index dc5be832b..b613b1749 100644 --- a/src/common/testpoint/testpoint.h +++ b/src/common/testpoint/testpoint.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2012 - Christian Babeux + * Copyright (C) 2012 Christian Babeux * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef NTESTPOINT @@ -24,6 +14,10 @@ #include /* for caa_likely/unlikely */ +#ifdef __cplusplus +extern "C" { +#endif + extern int lttng_testpoint_activated; void *lttng_testpoint_lookup(const char *name); @@ -53,7 +47,7 @@ void *lttng_testpoint_lookup(const char *name); ret = tp(); \ } else { \ if (!found) { \ - tp = lttng_testpoint_lookup(tp_name); \ + tp = (int (*)(void)) lttng_testpoint_lookup(tp_name); \ if (tp) { \ found = 1; \ ret = tp(); \ @@ -69,4 +63,8 @@ void *lttng_testpoint_lookup(const char *name); #define TESTPOINT_DECL(name) \ _TESTPOINT_DECL(name) +#ifdef __cplusplus +} +#endif + #endif /* NTESTPOINT */