diff options
author | rpj <rpj> | 1999-02-21 06:38:06 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-02-21 06:38:06 +0000 |
commit | 1acd28b4aec86a907846e1715bc95208d6e277e6 (patch) | |
tree | 45ee712e6b50cd61d810782ec4b30eb08fd0369e | |
parent | 46cb13531327c59ce4e3189e1a5b1763ed248095 (diff) |
Sun Feb 21 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* pthread.h (PTHREAD_MUTEX_INITIALIZER): missing braces around
cs element initialiser.
Bring some tests up-to-date.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pthread.h | 2 | ||||
-rw-r--r-- | tests/ChangeLog | 6 | ||||
-rw-r--r-- | tests/self2.c | 4 | ||||
-rw-r--r-- | tests/self3.c | 16 |
5 files changed, 18 insertions, 15 deletions
@@ -1,3 +1,8 @@ +Sun Feb 21 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> + + * pthread.h (PTHREAD_MUTEX_INITIALIZER): missing braces around + cs element initialiser. + 1999-02-21 Ben Elliston <bje@cygnus.com> * pthread.h (pthread_exit): The return type of this function is @@ -468,7 +468,7 @@ extern "C" /* * */ -#define PTHREAD_MUTEX_INITIALIZER { 1, 1, 0, NULL } +#define PTHREAD_MUTEX_INITIALIZER { 1, 1, 0, {NULL} } /* diff --git a/tests/ChangeLog b/tests/ChangeLog index cb1abab..962f922 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +1999-02-22 Ross Johnson <rpj@ise.canberra.edu.au> + + * self2.c: Bring up to date. + + * self3.c: Ditto. + 1999-02-21 Ben Elliston <bje@cygnus.com> * README: Update. diff --git a/tests/self2.c b/tests/self2.c index 51cc129..461e5f9 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -1,6 +1,4 @@ #include <pthread.h> -/* Hack. Peer into implementation details. */ -#include <implement.h> #include <assert.h> #include <stdio.h> @@ -13,7 +11,7 @@ entry(void * arg) ordinarily bad, m'kay? */ pthread_t t = pthread_self(); - printf("my thread is %lx\n", t->win32handle); + printf("my thread is %lx\n", t->threadH); return arg; } diff --git a/tests/self3.c b/tests/self3.c index 5cc8296..dc220b7 100644 --- a/tests/self3.c +++ b/tests/self3.c @@ -1,6 +1,4 @@ #include <pthread.h> -/* Hack. Peer into implementation details. */ -#include <implement.h> #include <assert.h> #include <stdio.h> @@ -13,7 +11,7 @@ entry(void * arg) ordinarily bad, m'kay? */ pthread_t t = pthread_self(); - printf("thread no. %d has id %lx\n", (int) arg, t->win32handle); + printf("thread no. %d has id %lx\n", (int) arg, t->threadH); return 0; } @@ -23,15 +21,11 @@ main() int rc; pthread_t t[2]; - if (pthread_create(&t[0], NULL, entry, (void *) 1) != 0) - { - return 1; - } + rc = pthread_create(&t[0], NULL, entry, (void *) 1); + assert(rc == 0); - if (pthread_create(&t[1], NULL, entry, (void *) 2) != 0) - { - return 1; - } + rc = pthread_create(&t[1], NULL, entry, (void *) 2); + assert(rc == 0); Sleep(2000); return 0; |