diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-09-28 18:47:13 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-10-14 20:27:12 -0400 |
commit | 557673603bb553e90106e7d14da6447a5ff82164 (patch) | |
tree | c689824388134be6f38046eb8e3927e736d6b515 /src | |
parent | 373376608394e4227b3a0027d06a8f0b39ddd40d (diff) | |
download | musl-557673603bb553e90106e7d14da6447a5ff82164.tar.gz musl-557673603bb553e90106e7d14da6447a5ff82164.tar.xz musl-557673603bb553e90106e7d14da6447a5ff82164.zip |
move aio implementation details to a proper internal header
also fix the lack of declaration (and thus hidden visibility) in __stdio_close's use of __aio_close.
Diffstat (limited to 'src')
-rw-r--r-- | src/aio/aio.c | 1 | ||||
-rw-r--r-- | src/aio/aio_suspend.c | 1 | ||||
-rw-r--r-- | src/include/unistd.h | 1 | ||||
-rw-r--r-- | src/internal/aio_impl.h | 9 | ||||
-rw-r--r-- | src/internal/pthread_impl.h | 3 | ||||
-rw-r--r-- | src/process/_Fork.c | 1 | ||||
-rw-r--r-- | src/stdio/__stdio_close.c | 1 | ||||
-rw-r--r-- | src/unistd/close.c | 1 |
8 files changed, 14 insertions, 4 deletions
diff --git a/src/aio/aio.c b/src/aio/aio.c index f59679c3..b488e3d6 100644 --- a/src/aio/aio.c +++ b/src/aio/aio.c @@ -9,6 +9,7 @@ #include "syscall.h" #include "atomic.h" #include "pthread_impl.h" +#include "aio_impl.h" /* The following is a threads-based implementation of AIO with minimal * dependence on implementation details. Most synchronization is diff --git a/src/aio/aio_suspend.c b/src/aio/aio_suspend.c index 34b66f87..1c1060e3 100644 --- a/src/aio/aio_suspend.c +++ b/src/aio/aio_suspend.c @@ -3,6 +3,7 @@ #include <time.h> #include "atomic.h" #include "pthread_impl.h" +#include "aio_impl.h" int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec *ts) { diff --git a/src/include/unistd.h b/src/include/unistd.h index 1b4605c7..7b52a924 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -8,7 +8,6 @@ extern char **__environ; hidden int __dup3(int, int, int); hidden int __mkostemps(char *, int, int); hidden int __execvpe(const char *, char *const *, char *const *); -hidden int __aio_close(int); hidden off_t __lseek(int, off_t, int); #endif diff --git a/src/internal/aio_impl.h b/src/internal/aio_impl.h new file mode 100644 index 00000000..a8657665 --- /dev/null +++ b/src/internal/aio_impl.h @@ -0,0 +1,9 @@ +#ifndef AIO_IMPL_H +#define AIO_IMPL_H + +extern hidden volatile int __aio_fut; + +extern hidden int __aio_close(int); +extern hidden void __aio_atfork(int); + +#endif diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 394dcb19..1322a6a8 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -154,11 +154,8 @@ hidden int __pthread_key_delete_impl(pthread_key_t); extern hidden volatile size_t __pthread_tsd_size; extern hidden void *__pthread_tsd_main[]; -extern hidden volatile int __aio_fut; extern hidden volatile int __eintr_valid_flag; -extern hidden void __aio_atfork(int); - hidden int __clone(int (*)(void *), void *, int, void *, ...); hidden int __set_thread_area(void *); hidden int __libc_sigaction(int, const struct sigaction *, struct sigaction *); diff --git a/src/process/_Fork.c b/src/process/_Fork.c index 1f41197c..da063868 100644 --- a/src/process/_Fork.c +++ b/src/process/_Fork.c @@ -4,6 +4,7 @@ #include "libc.h" #include "lock.h" #include "pthread_impl.h" +#include "aio_impl.h" static void dummy(int x) { } weak_alias(dummy, __aio_atfork); diff --git a/src/stdio/__stdio_close.c b/src/stdio/__stdio_close.c index 79452bdb..30291328 100644 --- a/src/stdio/__stdio_close.c +++ b/src/stdio/__stdio_close.c @@ -1,4 +1,5 @@ #include "stdio_impl.h" +#include "aio_impl.h" static int dummy(int fd) { diff --git a/src/unistd/close.c b/src/unistd/close.c index 5b38e019..a2105f50 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -1,5 +1,6 @@ #include <unistd.h> #include <errno.h> +#include "aio_impl.h" #include "syscall.h" static int dummy(int fd) |