Refactoring: Privatize ring buffer config header
[lttng-ust.git] / tests / compile / test-app-ctx / hello.c
index ec51263572090336db394eb90cbef9cef77b438e..19901c7caf64559c8a8fd9e3c7370e1e38fd85b4 100644 (file)
@@ -1,20 +1,8 @@
 /*
- * Copyright (C) 2009  Pierre-Marc Fournier
- * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; version 2.1 of
- * the License.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ * Copyright (C) 2009 Pierre-Marc Fournier
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
 #include <fcntl.h>
@@ -40,10 +28,10 @@ struct mmsghdr;
 #define TRACEPOINT_DEFINE
 #include "ust_tests_hello.h"
 
-/* Internal header. */
 #include <lttng/ust-events.h>
-#include <lttng/ringbuffer-config.h>
-#include <lttng/ust-context-provider.h>
+#include <lttng/ringbuffer-context.h>
+/* Internal header. */
+#include <ust-context-provider.h>
 
 static __thread unsigned int test_count;
 
@@ -53,7 +41,7 @@ void test_inc_count(void)
 }
 
 static
-size_t test_get_size(struct lttng_ctx_field *field, size_t offset)
+size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
        size_t size = 0;
@@ -114,7 +102,7 @@ size_t test_get_size(struct lttng_ctx_field *field, size_t offset)
 }
 
 static
-void test_record(struct lttng_ctx_field *field,
+void test_record(struct lttng_ust_ctx_field *field,
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_channel *chan)
 {
@@ -218,8 +206,8 @@ void test_record(struct lttng_ctx_field *field,
 }
 
 static
-void test_get_value(struct lttng_ctx_field *field,
-               struct lttng_ctx_value *value)
+void test_get_value(struct lttng_ust_ctx_field *field,
+               struct lttng_ust_ctx_value *value)
 {
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
 
@@ -266,6 +254,7 @@ void test_get_value(struct lttng_ctx_field *field,
 }
 
 struct lttng_ust_context_provider myprovider = {
+       .struct_size = sizeof(struct lttng_ust_context_provider),
        .name = "$app.myprovider",
        .get_size = test_get_size,
        .record = test_record,
This page took 0.024304 seconds and 4 git commands to generate.