mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Fix misspellings in sysdeps/ -- BZ 25337
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* C11 threads conditional wait implementaiton.
|
||||
/* C11 threads conditional wait implementation.
|
||||
Copyright (C) 2018-2023 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
|
@ -74,7 +74,7 @@ extern struct timer_node __timer_array[TIMER_MAX];
|
||||
/* Global lock to protect operation on the lists. */
|
||||
extern pthread_mutex_t __timer_mutex;
|
||||
|
||||
/* Variable to protext initialization. */
|
||||
/* Variable to protect initialization. */
|
||||
extern pthread_once_t __timer_init_once_control;
|
||||
|
||||
/* Nonzero if initialization of timer implementation failed. */
|
||||
|
@ -76,7 +76,7 @@ typedef union
|
||||
/* Threads functions. */
|
||||
|
||||
/* Create a new thread executing the function __FUNC. Arguments for __FUNC
|
||||
are passed through __ARG. If succesful, __THR is set to new thread
|
||||
are passed through __ARG. If successful, __THR is set to new thread
|
||||
identifier. */
|
||||
extern int thrd_create (thrd_t *__thr, thrd_start_t __func, void *__arg);
|
||||
|
||||
|
@ -75,7 +75,7 @@ do_test (void)
|
||||
}
|
||||
|
||||
/* A value higher than 0 will check for uncontended pthread cancellation,
|
||||
where the sem_wait operation will return immediatelly. */
|
||||
where the sem_wait operation will return immediately. */
|
||||
if (sem_init (&sem, 0, 1) != 0)
|
||||
{
|
||||
puts ("error: sem_init failed");
|
||||
|
@ -35,7 +35,7 @@ do_test (void)
|
||||
if (sysconf (_SC_THREAD_CPUTIME) >= 0)
|
||||
# endif
|
||||
{
|
||||
puts ("cpuclock advertized, but cannot get ID");
|
||||
puts ("cpuclock advertised, but cannot get ID");
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ do_test (void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
puts ("get lock outselves");
|
||||
puts ("get lock ourselves");
|
||||
|
||||
err = pthread_mutex_lock (&mut);
|
||||
if (err != 0)
|
||||
|
@ -55,7 +55,7 @@ tf (void *arg)
|
||||
{
|
||||
pthread_key_t *key = (pthread_key_t *) arg;
|
||||
|
||||
/* Use an arbirary but valid pointer to avoid GCC warnings. */
|
||||
/* Use an arbitrary but valid pointer to avoid GCC warnings. */
|
||||
if (pthread_setspecific (*key, arg) != 0)
|
||||
{
|
||||
write_message ("setspecific failed\n");
|
||||
|
@ -47,7 +47,7 @@ thr_func (void *arg)
|
||||
There was a race in FORCE_ELISION macro which leads to either
|
||||
pthread_mutex_destroy returning EBUSY as the owner was recorded
|
||||
by pthread_mutex_lock - in "normal mutex" code path - but was not
|
||||
resetted in pthread_mutex_unlock - in "elision" code path.
|
||||
reset in pthread_mutex_unlock - in "elision" code path.
|
||||
Or it leads to the assertion in nptl/pthread_mutex_lock.c:
|
||||
assert (mutex->__data.__owner == 0);
|
||||
Please ensure that the test is run with lock elision:
|
||||
|
@ -43,7 +43,7 @@ tf (void *arg)
|
||||
e = pthread_mutex_trylock (&m);
|
||||
if (e == 0)
|
||||
{
|
||||
puts ("child: 1st trylock suceeded");
|
||||
puts ("child: 1st trylock succeeded");
|
||||
exit (1);
|
||||
}
|
||||
if (e != EBUSY)
|
||||
|
@ -68,11 +68,11 @@
|
||||
391 r ^ PTHREAD_RWLOCK_WRPHASE))
|
||||
392 {
|
||||
|
||||
And then attemps to start the read phase.
|
||||
And then attempts to start the read phase.
|
||||
|
||||
Assume there happens to be a tryrdlock at this point, noting
|
||||
that PTHREAD_RWLOCK_WRLOCKED is clear, and PTHREAD_RWLOCK_WRPHASE
|
||||
is 1. So the try lock attemps to start the read phase.
|
||||
is 1. So the try lock attempts to start the read phase.
|
||||
|
||||
In __pthread_rwlock_tryrdlock:
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
readers might indeed be waiting, and they are.
|
||||
|
||||
The atomic_store_relaxed throws away PTHREAD_RWLOCK_FUTEX_USED,
|
||||
and the waiting reader is never worken becuase as noted
|
||||
and the waiting reader is never worken because as noted
|
||||
above it is conditional on the futex being used.
|
||||
|
||||
The solution is for the trylock thread to inspect
|
||||
@ -257,7 +257,7 @@
|
||||
If we did not install the write phase then the readers may already
|
||||
be waiting on the futex, the original writer wrote 1 to __wrphase_futex
|
||||
as part of starting the write phase, and we cannot also write 1
|
||||
without loosing the PTHREAD_RWLOCK_FUTEX_USED bit.
|
||||
without losing the PTHREAD_RWLOCK_FUTEX_USED bit.
|
||||
|
||||
---
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
Summary for the pthread_rwlock_trywrlock() stall:
|
||||
|
||||
The stall is caused by pthread_rwlock_trywrlock setting
|
||||
__wrphase_futex futex to 1 and loosing the
|
||||
__wrphase_futex futex to 1 and losing the
|
||||
PTHREAD_RWLOCK_FUTEX_USED bit.
|
||||
|
||||
The fix for bug 23844 ensures that waiters on __wrphase_futex are
|
||||
|
@ -39,7 +39,7 @@ tf (void *arg)
|
||||
pthread_key_t key = (pthread_key_t) (long int) arg;
|
||||
int err;
|
||||
|
||||
/* Use an arbirary but valid pointer to avoid GCC warnings. */
|
||||
/* Use an arbitrary but valid pointer to avoid GCC warnings. */
|
||||
err = pthread_setspecific (key, &result);
|
||||
if (err != 0)
|
||||
result = 3;
|
||||
|
Reference in New Issue
Block a user