From: Rich Felker Date: Tue, 16 Oct 2018 04:59:43 +0000 (-0400) Subject: move stdio locking MAYBE_WAITERS definition to stdio_impl.h X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=2085378a4fad15f65686d78f52dc6fb5362bdf20;p=musl move stdio locking MAYBE_WAITERS definition to stdio_impl.h don't repeat definition in two places. --- diff --git a/src/internal/stdio_impl.h b/src/internal/stdio_impl.h index 8c81fd53..ab34da2a 100644 --- a/src/internal/stdio_impl.h +++ b/src/internal/stdio_impl.h @@ -94,6 +94,8 @@ hidden void __register_locked_file(FILE *, struct __pthread *); hidden void __unlist_locked_file(FILE *); hidden void __do_orphaned_stdio_locks(void); +#define MAYBE_WAITERS 0x40000000 + hidden void __getopt_msg(const char *, const char *, const char *, size_t); #define feof(f) ((f)->flags & F_EOF) diff --git a/src/stdio/__lockfile.c b/src/stdio/__lockfile.c index 0dcb2a42..0f60a149 100644 --- a/src/stdio/__lockfile.c +++ b/src/stdio/__lockfile.c @@ -1,8 +1,6 @@ #include "stdio_impl.h" #include "pthread_impl.h" -#define MAYBE_WAITERS 0x40000000 - int __lockfile(FILE *f) { int owner = f->lock, tid = __pthread_self()->tid; diff --git a/src/stdio/ftrylockfile.c b/src/stdio/ftrylockfile.c index 3b97807a..50650585 100644 --- a/src/stdio/ftrylockfile.c +++ b/src/stdio/ftrylockfile.c @@ -2,8 +2,6 @@ #include "pthread_impl.h" #include -#define MAYBE_WAITERS 0x40000000 - void __do_orphaned_stdio_locks() { FILE *f;