summaryrefslogtreecommitdiffstats
path: root/lib/libkse/test/hello_d.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/test/hello_d.c')
-rw-r--r--lib/libkse/test/hello_d.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/libkse/test/hello_d.c b/lib/libkse/test/hello_d.c
new file mode 100644
index 0000000..6d77526
--- /dev/null
+++ b/lib/libkse/test/hello_d.c
@@ -0,0 +1,38 @@
+/****************************************************************************
+ *
+ * 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;
+}
OpenPOWER on IntegriCloud