Back to index

glibc  2.9
stdio_ext.h
Go to the documentation of this file.
00001 #ifndef       _STDIO_EXT_H
00002 
00003 # include <stdio-common/stdio_ext.h>
00004 
00005 extern int __fsetlocking_internal (FILE *__fp, int __type) attribute_hidden;
00006 
00007 #define __fsetlocking(fp, type) \
00008   ({ int __result = ((fp->_flags & _IO_USER_LOCK)                     \
00009                    ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL);    \
00010                                                                \
00011      if (type != FSETLOCKING_QUERY)                                   \
00012        {                                                       \
00013         fp->_flags &= ~_IO_USER_LOCK;                                 \
00014         if (type == FSETLOCKING_BYCALLER)                      \
00015           fp->_flags |= _IO_USER_LOCK;                                \
00016        }                                                       \
00017                                                                \
00018      __result;                                                        \
00019   })
00020 
00021 
00022 #endif