Back to index

glibc  2.9
Defines | Functions
tst-clock1.c File Reference
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "../test-skeleton.c"

Go to the source code of this file.

Defines

#define TEST_FUNCTION   do_test ()

Functions

int do_test (void)

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 50 of file tst-clock1.c.


Function Documentation

int do_test ( void  )

Definition at line 28 of file tst-clock1.c.

{
#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
  clockid_t cl;
  /* This is really only a linking-test here.  */
  int e = pthread_getcpuclockid (pthread_self (), &cl);
  if (e != 0)
    {
# if _POSIX_THREAD_CPUTIME == 0
      if (sysconf (_SC_THREAD_CPUTIME) >= 0)
# endif
       {
         puts ("cpuclock advertized, but cannot get ID");
         exit (1);
       }
    }
#endif

  return 0;
}

Here is the call graph for this function: