X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregister_test%2Fregister_test.c;h=1221e0aacccb25e04a3aca0a62f744bd6cb27d40;hb=8161463975e218e0833d31ab1577a7ceb9e8e9f3;hp=90fca12edf99f3ceba67f5e82ee22aa07774079f;hpb=cacf036243594e11fc8a7e0f47f07af97a79042f;p=ust.git diff --git a/tests/register_test/register_test.c b/tests/register_test/register_test.c index 90fca12..1221e0a 100644 --- a/tests/register_test/register_test.c +++ b/tests/register_test/register_test.c @@ -1,4 +1,6 @@ -/* Copyright (C) 2010 Nils Carlson +/* + * Copyright (C) 2010 Nils Carlson + * Copyright (C) 2011 Mathieu Desnoyers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,11 +29,9 @@ #include #include "usterr.h" -#include "tracer.h" -#include "tp.h" - -DEFINE_TRACE(hello_tptest); +#define TRACEPOINT_CREATE_PROBES +#include "tp.h" struct hello_trace_struct { char *message; @@ -45,7 +45,7 @@ void tptest_probe(void *data, int anint) { struct hello_trace_struct *hello; char message[30]; - hello=(struct hello_trace_struct *)data; + hello = (struct hello_trace_struct *)data; //printf("this is the message: %s\n", hello->message); snprintf(message, 30, "this is the %s\n", hello->message); } @@ -53,43 +53,43 @@ void tptest_probe(void *data, int anint) #define HELLO_LENGTH 100 -static void * register_thread_main(void *data) +static void *register_thread_main(void *data) { - int ret, i, j = 0; - + int i, j = 0; struct hello_trace_struct hello[HELLO_LENGTH]; - for (i=0; i