mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
be1d533999
a new test for POSIX semaphores was added, and examples of harness usage are included.
39 lines
669 B
C
39 lines
669 B
C
/****************************************************************************
|
|
*
|
|
* Simple diff mode test.
|
|
*
|
|
* $FreeBSD$
|
|
*
|
|
****************************************************************************/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <pthread.h>
|
|
|
|
void *
|
|
entry(void * a_arg)
|
|
{
|
|
fprintf(stderr, "Hello world\n");
|
|
|
|
return NULL;
|
|
}
|
|
|
|
int
|
|
main()
|
|
{
|
|
pthread_t thread;
|
|
int error;
|
|
|
|
error = pthread_create(&thread, NULL, entry, NULL);
|
|
if (error)
|
|
fprintf(stderr, "Error in pthread_create(): %s\n",
|
|
strerror(error));
|
|
|
|
error = pthread_join(thread, NULL);
|
|
if (error)
|
|
fprintf(stderr, "Error in pthread_join(): %s\n",
|
|
strerror(error));
|
|
|
|
return 0;
|
|
}
|