#include <pthread.h>
#include <stdio.h>
#include <errno.h>

#define FAILED do \
    { \
        fprintf (stderr, "FAIL: at <%s:%d> %s\n", \
            __FILE__, __LINE__, strerror (errno)); \
        exit (1); \
    } while (0)

#define FAILED_ERRNO(code) do \
    { \
        fprintf (stderr, "FAIL: at <%s:%d> %s\n", \
            __FILE__, __LINE__, strerror (status)); \
        exit (1); \
    } while (0)

#define PASSED do \
    { \
        fprintf (stderr, "PASS: %s\n", __FILE__); \
        exit (0); \
    } while (0)

/**
 Simple check for equality.
*/

void
main ()
{
	pthread_t th;

	th = pthread_self ();

	if (pthread_equal (th, th))
		PASSED;

	FAILED;		
}
