make internal declarations for flockfile tracking functions checkable
logically these belong to the intersection of the stdio and pthread subsystems, and either place the declarations could go (stdio_impl.h or pthread_impl.h) requires a forward declaration for one of the argument types.
This commit is contained in:
@@ -80,6 +80,11 @@ FILE *__ofl_add(FILE *f);
|
||||
FILE **__ofl_lock(void);
|
||||
void __ofl_unlock(void);
|
||||
|
||||
struct __pthread;
|
||||
void __register_locked_file(FILE *, struct __pthread *);
|
||||
void __unlist_locked_file(FILE *);
|
||||
void __do_orphaned_stdio_locks(void);
|
||||
|
||||
#define feof(f) ((f)->flags & F_EOF)
|
||||
#define ferror(f) ((f)->flags & F_ERR)
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "stdio_impl.h"
|
||||
#include "pthread_impl.h"
|
||||
|
||||
void __register_locked_file(FILE *, pthread_t);
|
||||
|
||||
void flockfile(FILE *f)
|
||||
{
|
||||
if (!ftrylockfile(f)) return;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "stdio_impl.h"
|
||||
#include "pthread_impl.h"
|
||||
|
||||
void __unlist_locked_file(FILE *);
|
||||
|
||||
void funlockfile(FILE *f)
|
||||
{
|
||||
if (f->lockcount == 1) {
|
||||
|
||||
Reference in New Issue
Block a user