+2019-07-14 Bruno Haible <bruno@clisp.org>
+
+ pthread_sigmask tests: Use new multithread modules.
+ * tests/test-pthread_sigmask2.c: Include <pthread.h> instead of
+ glthread/thread.h.
+ (main_thread, killer_thread): Change type to pthread_t.
+ (main): Update accordingly.
+ * modules/pthread_sigmask-tests (Depends-on): Add pthread-thread. Remove
+ thread.
+
2019-07-14 Bruno Haible <bruno@clisp.org>
pthread-tss: Add tests.
#include <signal.h>
#include <errno.h>
+#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
-#include "glthread/thread.h"
-
#include "macros.h"
#if USE_POSIX_THREADS
-static gl_thread_t main_thread;
-static gl_thread_t killer_thread;
+static pthread_t main_thread;
+static pthread_t killer_thread;
static void *
killer_thread_func (void *arg)
ASSERT (pthread_sigmask (SIG_BLOCK, &set, NULL) == 0);
/* Request a SIGINT signal from another thread. */
- main_thread = gl_thread_self ();
- ASSERT (glthread_create (&killer_thread, killer_thread_func, NULL) == 0);
+ main_thread = pthread_self ();
+ ASSERT (pthread_create (&killer_thread, NULL, killer_thread_func, NULL) == 0);
/* Wait. */
sleep (2);
/* Clean up the thread. This avoid a "ThreadSanitizer: thread leak" warning
from "gcc -fsanitize=thread". */
- gl_thread_join (killer_thread, NULL);
+ ASSERT (pthread_join (killer_thread, NULL) == 0);
return 0;
}