summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/_types.h2
-rw-r--r--newlib/libc/include/sys/lock.h2
-rw-r--r--newlib/libc/include/sys/reent.h11
3 files changed, 14 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 9f3b05b39..c47a6adac 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -43,4 +43,6 @@ typedef _mbstate_t mbstate_t;
# define WEOF (0xffffffffu)
#endif /* __CYGWIN__ */
+typedef int _flock_t;
+
#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/lock.h b/newlib/libc/include/sys/lock.h
index efdd7316f..984bc5f80 100644
--- a/newlib/libc/include/sys/lock.h
+++ b/newlib/libc/include/sys/lock.h
@@ -14,6 +14,8 @@ typedef int _LOCK_RECURSIVE_T;
#define __lock_close_recursive(lock) {}
#define __lock_acquire(lock) {}
#define __lock_acquire_recursive(lock) {}
+#define __lock_try_acquire(lock) {}
+#define __lock_try_acquire_recursive(lock) {}
#define __lock_release(lock) {}
#define __lock_release_recursive(lock) {}
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index ebdf32a8e..09160a9fc 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -192,7 +192,11 @@ struct __sFILE {
int _offset; /* current lseek offset */
#ifndef _REENT_SMALL
- struct _reent *_data; /* Here for binary compatibility? Remove? */
+ struct _reent *_data; /* Here for binary compatibility? Remove? */
+#endif
+
+#ifndef __SINGLE_THREAD__
+ _flock_t _lock; /* for thread-safety locking */
#endif
};
@@ -232,8 +236,13 @@ struct __sFILE64 {
/* Unix stdio files get aligned to block boundaries on fseek() */
int _blksize; /* stat.st_blksize (may be != _bf._size) */
int _flags2; /* for future use */
+
_off64_t _offset; /* current lseek offset */
_fpos64_t _EXFUN((*_seek64),(_PTR _cookie, _fpos64_t _offset, int _whence));
+
+#ifndef __SINGLE_THREAD__
+ _flock_t _lock; /* for thread-safety locking */
+#endif
};
typedef struct __sFILE64 __FILE;
#else