diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2014-12-15 18:22:56 +0000 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2014-12-15 18:22:56 +0000 |
commit | 6485fc66f2fada39e681ad316352f60a17ac1367 (patch) | |
tree | ff01497d054390325e76ac7adb0307279a4bf9e1 /newlib/libc/include | |
parent | f5ce72dffc738d43213e566d8ae082d7428f8be9 (diff) | |
download | cygnal-6485fc66f2fada39e681ad316352f60a17ac1367.tar.gz cygnal-6485fc66f2fada39e681ad316352f60a17ac1367.tar.bz2 cygnal-6485fc66f2fada39e681ad316352f60a17ac1367.zip |
* libc/include/stdio.h (__SNLK): Define.
* libc/include/stdio_ext.h (FSETLOCKING_QUERY, FSETLOCKING_INTERNAL,
FSETLOCKING_BYCALLER): Define.
(__fsetlocking): Declare.
* libc/stdio/Makefile.am: Build fsetlocking.c.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/fsetlocking.c: New file.
* libc/stdio/local.h (_newlib_flockfile_start): Make _flockfile
call dependent on __SNLK flag.
(_newlib_flockfile_exit, _newlib_flockfile_end): Ditto for
_funlockfile calls.
Define all locking macros as empty if __SINGLE_THREAD__.
* libc/stdio/stdio.tex: Include fsetlocking.def.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/stdio.h | 1 | ||||
-rw-r--r-- | newlib/libc/include/stdio_ext.h | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index 620bfbcf2..eb2d24939 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -83,6 +83,7 @@ typedef _fpos64_t fpos64_t; #define __SL64 0x8000 /* is 64-bit offset large file */ /* _flags2 flags */ +#define __SNLK 0x0001 /* stdio functions do not lock streams themselves */ #define __SWID 0x2000 /* true => stream orientation wide, false => byte, only valid if __SORD in _flags is true */ /* diff --git a/newlib/libc/include/stdio_ext.h b/newlib/libc/include/stdio_ext.h index 4b6f8ae36..029ab0253 100644 --- a/newlib/libc/include/stdio_ext.h +++ b/newlib/libc/include/stdio_ext.h @@ -13,14 +13,18 @@ #include <stdio.h> +#define FSETLOCKING_QUERY 0 +#define FSETLOCKING_INTERNAL 1 +#define FSETLOCKING_BYCALLER 2 + _BEGIN_STD_C void _EXFUN(__fpurge,(FILE *)); +int _EXFUN(__fsetlocking,(FILE *, int)); /* TODO: void _flushlbf (void); - int __fsetlocking (FILE *__fp, int __type); */ #ifdef __GNUC__ |