4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 03:27:46 +08:00

2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>

* libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
        * libc/include/sys/stat.h: Use struct timespec st_*tim,
        blksize_t st_blksize, blkcnt_t st_blocks.
        Add st_*time compatibility macros.
This commit is contained in:
Jeff Johnston 2009-12-17 19:22:23 +00:00
parent 314c2d2fed
commit f10d348770
3 changed files with 27 additions and 15 deletions

View File

@ -1,3 +1,10 @@
2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
* libc/include/sys/stat.h: Use struct timespec st_*tim,
blksize_t st_blksize, blkcnt_t st_blocks.
Add st_*time compatibility macros.
2009-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rtems/machine/param.h: Only use sizeof(double) -1

View File

@ -33,21 +33,10 @@ extern "C" {
#include <time.h>
#include <sys/sched.h>
/* Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27
If an OS does not support processes, then it falls under this provision
and may not provide pthread_atfork():
"Either the implementation shall support the pthread_atfork() function
as described above or the pthread_atfork() funciton shall not be
provided."
NOTE: RTEMS does not provide pthread_atfork(). */
#if !defined(__rtems__) && !defined(__XMK__)
#warning "Add pthread_atfork() prototype"
#endif
/* Register Fork Handlers */
int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void),
void (*child)(void)));
/* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */
int _EXFUN(pthread_mutexattr_init, (pthread_mutexattr_t *__attr));
@ -345,6 +334,7 @@ int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,

View File

@ -32,6 +32,13 @@ struct stat
gid_t st_gid;
dev_t st_rdev;
off_t st_size;
#if defined(__rtems__)
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
blksize_t st_blksize;
blkcnt_t st_blocks;
#else
/* SysV/sco doesn't have the rest... But Solaris, eabi does. */
#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
time_t st_atime;
@ -48,7 +55,15 @@ struct stat
long st_blocks;
long st_spare4[2];
#endif
#endif
};
#if defined(__rtems__)
#define st_atime st_atim.tv_sec
#define st_ctime st_ctim.tv_sec
#define st_mtime st_mtim.tv_sec
#endif
#endif
#define _IFMT 0170000 /* type of file */