From 3b401b823ca98e6329450874eadeaa5f5c120cd1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 1 Jun 2020 15:23:05 +0200 Subject: Add tests for manually testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- tests/threads.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/threads.c (limited to 'tests/threads.c') diff --git a/tests/threads.c b/tests/threads.c new file mode 100644 index 0000000..18b0145 --- /dev/null +++ b/tests/threads.c @@ -0,0 +1,21 @@ +#include +#include + +static int x; + +static void * +thread_main(void *data) +{ + sleep(1); + return data; +} + +int +main(void) +{ + pthread_t thread; + if (pthread_create(&thread, NULL, thread_main, &x)) + return 2; + sleep(2); + return 1; +} -- cgit v1.2.3-70-g09d2