mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
cc5d5852c6
The aio_suspend function has been converted to support 64 bit time. This change uses (in aio_misc.h): - __futex_abstimed_wait64 (instead of futex_reltimed_wait) - __futex_abstimed_wait_cancellable64 (instead of futex_reltimed_wait_cancellable) from ./sysdeps/nptl/futex-helpers.h The aio_suspend() accepts relative timeout, which then is converted to absolute one. The i686-gnu port (HURD) do not define DONT_NEED_AIO_MISC_COND and as it doesn't (yet) support 64 bit time it uses not converted pthread_cond_timedwait(). The __aio_suspend() is supposed to be run on ports with __TIMESIZE !=64 and __WORDSIZE==32. It internally utilizes __aio_suspend_time64() and hence the conversion from 32 bit struct timespec to 64 bit one is required. For ports supporting 64 bit time the __aio_suspend_time64() will be used either via alias (to __aio_suspend when __TIMESIZE==64) or redirection (when -D_TIME_BITS=64 is passed). Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
23 lines
619 B
C
23 lines
619 B
C
#ifndef _AIO_H
|
|
#include <rt/aio.h>
|
|
|
|
#ifndef _ISOMAC
|
|
/* Now define the internal interfaces. */
|
|
extern void __aio_init (const struct aioinit *__init);
|
|
|
|
/* Flag to signal we need to be compatible with glibc < 2.4 in
|
|
lio_listio and we do not issue events for each individual list
|
|
element. */
|
|
#define LIO_NO_INDIVIDUAL_EVENT 128
|
|
|
|
# if __TIMESIZE == 64
|
|
# define __aio_suspend_time64 __aio_suspend
|
|
# else
|
|
extern int __aio_suspend_time64 (const struct aiocb *const list[], int nent,
|
|
const struct __timespec64 *timeout);
|
|
librt_hidden_proto (__aio_suspend_time64)
|
|
# endif
|
|
#endif
|
|
|
|
#endif
|