Back to index

glibc  2.9
Defines | Functions | Variables
tst-cleanup1.c File Reference
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../test-skeleton.c"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define TEST_FUNCTION   do_test ()


static void ch (void *arg)
static void * tf (void *a)
int do_test (void)


static int global

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 99 of file tst-cleanup1.c.

Function Documentation

static void ch ( void *  arg) [static]

Definition at line 30 of file tst-cleanup1.c.

  int val = (long int) arg;

  printf ("ch (%d)\n", val);

  global *= val;
  global += val;

Here is the call graph for this function:

Here is the caller graph for this function:

int do_test ( void  )

Definition at line 65 of file tst-cleanup1.c.

  pthread_t th;

  if (pthread_create (&th, NULL, tf, NULL) != 0)
      write (2, "create failed\n", 14);
      _exit (1);

  void *r;
  int e;
  if ((e = pthread_join (th, &r)) != 0)
      printf ("join failed: %d\n", e);
      _exit (1);

      puts ("thread not canceled");
      exit (1);

  if (global != 9)
      printf ("global = %d, expected 9\n", global);
      exit (1);

  return 0;

Here is the call graph for this function:

static void* tf ( void *  a) [static]

Definition at line 42 of file tst-cleanup1.c.

Here is the call graph for this function:

Variable Documentation

int global [static]

Definition at line 26 of file tst-cleanup1.c.