1 |
2005-05-12 Neal H. Walfield <neal@gnu.org> |
2005-05-12 Neal H. Walfield <neal@gnu.org> |
2 |
|
|
3 |
* Makefile (SRCS): Add sem-close.c sem-destroy.c sem-getvalue.c |
* include/pthread/pthread.h (pthread_exit): Add noreturn |
4 |
sem-init.c sem-open.c sem-post.c sem-timedwait.c sem-trywait.c |
attribute. |
5 |
|
|
6 |
|
* sysdeps/generic/bits/condition.h (__PTHREAD_COND_INITIALIZER): |
7 |
|
Don't create a compound literal. |
8 |
|
* sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER): |
9 |
|
Don't create a compound literal. |
10 |
|
(pthread_mutex_init): Don't assign to *__MUTEX directly. |
11 |
|
Initialize an intermediate local variable and then copy the |
12 |
|
result. |
13 |
|
* sysdeps/generic/bits/rwlock.h (__PTHREAD_RWLOCK_INITIALIZER): |
14 |
|
Don't create a compound literal. |
15 |
|
(pthread_rwlock_init): Don't assign to *__RWLOCK directly. |
16 |
|
Initialize an intermediate local variable and then copy the |
17 |
|
result. |
18 |
|
* sysdeps/i386/bits/spin-lock.h (__SPIN_LOCK_INITIALIZER): |
19 |
|
Don't create a compound literal. |
20 |
|
|
21 |
|
* pthread/pt-alloc.c (initialize_pthread): Cast |
22 |
|
PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER to create a |
23 |
|
compound literal. |
24 |
|
* tests/test-1.c (main): Use pthread_mutex_init, not |
25 |
|
PTHREAD_MUTEX_INIT for mutex initialization |
26 |
|
|
27 |
|
* sysdeps/generic/pt-barrier-init.c (pthread_barrier_init): Remove |
28 |
|
assert. Copy ATTR if non-defaults are used. |
29 |
|
* sysdeps/generic/pt-cond-init.c (pthread_cond_init): Include |
30 |
|
<string.h>. Remove assert. Copy ATTR if non-defaults are used. |
31 |
|
* sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Cast |
32 |
|
PTHREAD_MUTEX_INITIALIZER to create a compound literal. |
33 |
|
* sysdeps/generic/pt-rwlock-init.c: Include <string.h>. |
34 |
|
(_pthread_rwlock_init): Cast __PTHREAD_RWLOCK_INITIALIZER to |
35 |
|
create a compound literal. Copy ATTR if non-defaults are used. |
36 |
|
|
37 |
|
* sysdeps/generic/pt-cond-timedwait.c |
38 |
|
(__pthread_cond_timedwait_internal): Check that ABSTIME->TV_NSEC |
39 |
|
is valid. Don't shadow ERR. Don't return before cleaning up. |
40 |
|
* sysdeps/generic/pt-mutex-timedlock.c (pthread_mutex_timedlock): |
41 |
|
Move after __pthread_mutex_timedlock_internal. Check that |
42 |
|
ABSTIME->TV_NSEC is valid. |
43 |
|
* sysdeps/generic/pt-rwlock-timedrdlock.c |
44 |
|
(pthread_rwlock_timedrdlock): Move after. |
45 |
|
__pthread_rwlock_timedrdlock_internal. |
46 |
|
(__pthread_rwlock_timedrdlock_internal): Check that |
47 |
|
ABSTIME->TV_NSEC is valid. |
48 |
|
* sysdeps/generic/pt-rwlock-timedwrlock.c |
49 |
|
(pthread_rwlock_timedwrlock): Move after |
50 |
|
__pthread_rwlock_timedwrlock_internal. |
51 |
|
(__pthread_rwlock_timedwrlock_internal): Check that |
52 |
|
ABSTIME->TV_NSEC is valid. |
53 |
|
* sysdeps/generic/sem-timedwait.c (__sem_timedwait_internal): |
54 |
|
Check that TIMEOUT->TV_NSEC is valid before enqueuing the thread. |
55 |
|
|
56 |
|
* sysdeps/generic/pt-rwlock-rdlock.c |
57 |
|
(__pthread_rwlock_timedrdlock_internal): Fix declaration. |
58 |
|
|
59 |
|
* sysdeps/generic/pt-mutex-trylock.c (__pthread_mutex_trylock): |
60 |
|
Don't return EDEADLK. POSIX does not allow it. |
61 |
|
|
62 |
|
* sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Calculate |
63 |
|
the relative timeout without overflowing. |
64 |
|
|
65 |
|
* sysdeps/mach/hurd/i386/pt-setup.c (stack_setup): Cast THREAD. |
66 |
|
|
67 |
|
2005-05-12 Neal H. Walfield <neal@gnu.org> |
68 |
|
|
69 |
|
* Makefile (SRCS): Add sem-close.c, sem-destroy.c, sem-getvalue.c, |
70 |
|
sem-init.c, sem-open.c, sem-post.c, sem-timedwait.c, sem-trywait.c, |
71 |
sem-unlink.c and sem-wait.c. |
sem-unlink.c and sem-wait.c. |
72 |
(sysdeps_headers): Add semaphore.h bits/semaphore.h. |
(sysdeps_headers): Add semaphore.h and bits/semaphore.h. |
73 |
* include/semaphore.h: New file. |
* include/semaphore.h: New file. |
74 |
* sysdeps/generic/sem-close.c: New file. |
* sysdeps/generic/sem-close.c: New file. |
75 |
* sysdeps/generic/sem-destroy.c: New file. |
* sysdeps/generic/sem-destroy.c: New file. |