1/* 2 * Copyright (c) 2004, Bull S.A.. All rights reserved. 3 * Created by: Sebastien Decugis 4 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it would be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 * 13 * You should have received a copy of the GNU General Public License along 14 * with this program; if not, write the Free Software Foundation, Inc., 59 15 * Temple Place - Suite 330, Boston MA 02111-1307, USA. 16 * 17 18 19 * This file is a wrapper to use the tests from the NPTL Test & Trace Project 20 * with either the Linux Test Project or the Open POSIX Test Suite. 21 22 * The following function are defined: 23 * void output_init() 24 * void output_fini() 25 * void output(char * string, ...) 26 * 27 * The are used to output informative text (as a printf). 28 */ 29 30/* We use a mutex to avoid conflicts in traces */ 31static pthread_mutex_t m_trace = PTHREAD_MUTEX_INITIALIZER; 32 33/*****************************************************************************************/ 34/******************************* stdout module *****************************************/ 35/*****************************************************************************************/ 36/* The following functions will output to stdout */ 37#if (1) 38void output_init() 39{ 40 /* do nothing */ 41 return; 42} 43void output( char * string, ... ) 44{ 45 va_list ap; 46 pthread_mutex_lock(&m_trace); 47 va_start( ap, string); 48 vprintf(string, ap); 49 va_end(ap); 50 pthread_mutex_unlock(&m_trace); 51} 52void output_fini() 53{ 54 /*do nothing */ 55 return; 56} 57#endif 58 59