mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 03:19:54 +08:00
3db40db7d8
* libc/include/sys/_types.h (_flock_t): Added. * libc/include/sys/lock.h (__lock_try_acquire): New interface. (__lock_try_acquire_recursive): Ditto. * libc/include/sys/reent.h (__sFILE, __sFILE64): Add new _lock field. * libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock field. * libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto. * libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto. * libc/sys/linux/include/time.h (struct timespec): Moved from <sys/types.h> and added check for __need_timespec flag so type can be defined by itself. * libc/sys/linux/sys/_types.h (_flock_t): New type. * libc/sys/linux/sys/types.h (struct timespec): Moved to <time.h>.
23 lines
664 B
C
23 lines
664 B
C
#ifndef __SYS_LOCK_H__
|
|
#define __SYS_LOCK_H__
|
|
|
|
/* dummy lock routines for single-threaded aps */
|
|
|
|
typedef int _LOCK_T;
|
|
typedef int _LOCK_RECURSIVE_T;
|
|
|
|
#define __LOCK_INIT(class,lock) static int lock = 0;
|
|
#define __LOCK_INIT_RECURSIVE(class,lock) static int lock = 0;
|
|
#define __lock_init(lock) {}
|
|
#define __lock_init_recursive(lock) {}
|
|
#define __lock_close(lock) {}
|
|
#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) {}
|
|
|
|
#endif /* __SYS_LOCK_H__ */
|