source: rtems/testsuites/psxtests/psxhdrs/pthread36.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 884 bytes
Line 
1/*
2 *  This test file is used to verify that the header files associated with
3 *  invoking this function are correct.
4 *
5 *  COPYRIGHT (c) 1989-2009.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.org/license/LICENSE.
11 */
12
13#ifdef HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <pthread.h>
18
19#if !HAVE_DECL_PTHREAD_ATTR_GETCPUTIME
20extern int pthread_attr_getcputime(
21  pthread_attr_t  *attr,
22  int             *clock_allowed);
23#endif
24
25#ifndef _POSIX_THREAD_CPUTIME
26#error "rtems is supposed to have pthread_attr_getcputime"
27#endif
28
29int test( void );
30
31int test( void )
32{
33  pthread_attr_t  attr;
34  int             clock_allowed;
35  int             result;
36
37  result = pthread_attr_getcputime( &attr, &clock_allowed );
38
39  return result;
40}
Note: See TracBrowser for help on using the repository browser.