timed_mutex_SOURCES = timed_mutex.cpp
timed_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
-thrd_create_SOURCES = thrd_create.cpp
+thrd_create_SOURCES = thrd_create.c
if VGCONF_OS_IS_FREEBSD
thrd_create_LDFLAGS = -lstdthreads
endif
--- /dev/null
+#include <stdio.h>
+#include <threads.h>
+
+int thread_entry(void *arg)
+{
+ fprintf(stderr, "Hello, world!\n");
+ return 0;
+}
+
+int main()
+{
+ thrd_t thr;
+ thrd_create(&thr, thread_entry, NULL);
+ thrd_join(thr, NULL);
+ return 0;
+}
+++ /dev/null
-#include <threads.h>
-#include <iostream>
-
-int main()
-{
- thrd_t thr;
- thrd_create(&thr, [](void *arg){std::cerr << "Hello, world!\n"; return 0;},
- NULL);
- thrd_join(thr, NULL);
- return 0;
-}