Back to index

glibc  2.9
Defines | Functions
tst-eintr4.c File Reference
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "eintr.c"
#include "../test-skeleton.c"

Go to the source code of this file.


#define TIMEOUT   1
#define TEST_FUNCTION   do_test ()


static int do_test (void)

Define Documentation


Definition at line 53 of file tst-eintr4.c.

#define TEST_FUNCTION   do_test ()

Definition at line 55 of file tst-eintr4.c.

#define TIMEOUT   1

Definition at line 54 of file tst-eintr4.c.

Function Documentation

static int do_test ( void  ) [static]

Definition at line 31 of file tst-eintr4.c.

  pthread_t self = pthread_self ();

  setup_eintr (SIGUSR1, &self);

  pthread_barrier_t b;
  if (pthread_barrier_init (&b, NULL, 2) != 0)
      puts ("barrier_init failed");
      exit (1);

  /* This call must never return.  */
  int e = pthread_barrier_wait (&b);

  if (e == EINTR)
    puts ("pthread_join returned with EINTR");

  return 0;

Here is the call graph for this function: