source: rtems/testsuites/support/include/test_support.h @ b97bc8bc

4.115
Last change on this file since b97bc8bc was b97bc8bc, checked in by Sebastian Huber <sebastian.huber@…>, on 05/07/14 at 16:27:19

tests: Add locked_printf_plugin()

Add locked_vprintf(). Return an int just like printf(), etc.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifndef __TEST_SUPPORT_h
11#define __TEST_SUPPORT_h
12
13#include <stdarg.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*
20 *  Return a pointer to the POSIX name that is slightly
21 *  beyond the legal limit.
22 */
23const char *Get_Too_Long_Name(void);
24
25/*
26 *  Return a pointer to the longest legal POSIX name.
27 */
28const char *Get_Longest_Name(void);
29
30/*
31 *  Spin for specified number of ticks.
32 */
33void rtems_test_spin_for_ticks(int ticks);
34
35/*
36 *  Spin until the next clock tick
37 */
38void rtems_test_spin_until_next_tick( void );
39
40/*********************************************************************/
41/*********************************************************************/
42/**************              TMTEST SUPPORT             **************/
43/*********************************************************************/
44/*********************************************************************/
45
46/*
47 *  Type of method used for timing operations
48 */
49typedef void (*rtems_time_test_method_t)(
50  int    iteration,
51  void  *argument
52);
53
54/*
55 *  Obtain baseline timing information for benchmark tests.
56 */
57void rtems_time_test_measure_operation(
58  const char               *description,
59  rtems_time_test_method_t  operation,
60  void                     *argument,
61  int                       iterations,
62  int                       overhead
63);
64
65/*********************************************************************/
66/*********************************************************************/
67/**************              TEST SUPPORT               **************/
68/*********************************************************************/
69/*********************************************************************/
70
71void locked_print_initialize(void);
72
73int locked_printf(const char *fmt, ...);
74
75int locked_vprintf(const char *fmt, va_list ap);
76
77int locked_printf_plugin(void *context, const char *fmt, ...);
78
79void locked_printk(const char *fmt, ...);
80
81#ifdef __cplusplus
82};
83#endif
84
85#endif
Note: See TracBrowser for help on using the repository browser.