Blame doc/examples/gen-tp/sample.c

Packit c04fcb
/*
Packit c04fcb
 * Copyright (C) 2011-2012  Matthew Khouzam <matthew.khouzam@ericsson.com>
Packit c04fcb
 * Copyright (C) 2012  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Packit c04fcb
 *
Packit c04fcb
 * Permission is hereby granted, free of charge, to any person obtaining a copy
Packit c04fcb
 * of this software and associated documentation files (the "Software"), to deal
Packit c04fcb
 * in the Software without restriction, including without limitation the rights
Packit c04fcb
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
Packit c04fcb
 * copies of the Software, and to permit persons to whom the Software is
Packit c04fcb
 * furnished to do so, subject to the following conditions:
Packit c04fcb
 *
Packit c04fcb
 * The above copyright notice and this permission notice shall be included in
Packit c04fcb
 * all copies or substantial portions of the Software.
Packit c04fcb
 *
Packit c04fcb
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit c04fcb
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit c04fcb
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit c04fcb
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit c04fcb
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
Packit c04fcb
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Packit c04fcb
 * SOFTWARE.
Packit c04fcb
 */
Packit c04fcb
Packit c04fcb
#include <unistd.h>
Packit c04fcb
Packit c04fcb
#include "sample_tracepoint.h"
Packit c04fcb
int main(int argc, char **argv)
Packit c04fcb
{
Packit c04fcb
	int i = 0;
Packit c04fcb
Packit c04fcb
	for (i = 0; i < 100000; i++) {
Packit c04fcb
		tracepoint(sample_tracepoint, message,  "Hello World\n");
Packit c04fcb
		usleep(1);
Packit c04fcb
	}
Packit c04fcb
	return 0;
Packit c04fcb
}