~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/include/libc/sys/stdio.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _NEWLIB_STDIO_H
2
 
#define _NEWLIB_STDIO_H
3
 
 
4
 
#include <sys/lock.h>
5
 
#include <sys/reent.h>
6
 
 
7
 
/* Internal locking macros, used to protect stdio functions.  In the
8
 
   general case, expand to nothing. Use __SSTR flag in FILE _flags to
9
 
   detect if FILE is private to sprintf/sscanf class of functions; if
10
 
   set then do nothing as lock is not initialised. */
11
 
#if !defined(_flockfile)
12
 
#ifndef __SINGLE_THREAD__
13
 
#  define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock))
14
 
#else
15
 
#  define _flockfile(fp)        (_CAST_VOID 0)
16
 
#endif
17
 
#endif
18
 
 
19
 
#if !defined(_funlockfile)
20
 
#ifndef __SINGLE_THREAD__
21
 
#  define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock))
22
 
#else
23
 
#  define _funlockfile(fp)      (_CAST_VOID 0)
24
 
#endif
25
 
#endif
26
 
 
27
 
#endif /* _NEWLIB_STDIO_H */