From 5f555b0bd35d3c18bd636bd15474178cda1264fc Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 2 May 2011 16:05:06 +0000 Subject: [PATCH] * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define. * libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t typedef. --- newlib/ChangeLog | 6 ++++++ newlib/libc/include/sys/features.h | 2 +- newlib/libc/include/sys/types.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index cbdbc0e63..b96c40a43 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2011-05-02 Yaakov Selkowitz + + * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define. + * libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t + typedef. + 2011-04-19 Corinna Vinschen * libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h index b2e56daae..db39bbba8 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -125,7 +125,7 @@ extern "C" { #define _POSIX_SHARED_MEMORY_OBJECTS 200112L #define _POSIX_SHELL 1 /* #define _POSIX_SPAWN -1 */ -/* #define _POSIX_SPIN_LOCKS -1 */ +#define _POSIX_SPIN_LOCKS 200112L /* #define _POSIX_SPORADIC_SERVER -1 */ #define _POSIX_SYNCHRONIZED_IO 200112L /* #define _POSIX_THREAD_ATTR_STACKADDR -1 */ diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index cf0b8dfc9..a8fee93ab 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -463,13 +463,13 @@ typedef struct { /* POSIX Spin Lock Types */ +#if !defined (__CYGWIN__) #if defined(_POSIX_SPIN_LOCKS) typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */ #endif /* defined(_POSIX_SPIN_LOCKS) */ /* POSIX Reader/Writer Lock Types */ -#if !defined (__CYGWIN__) #if defined(_POSIX_READER_WRITER_LOCKS) typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */ typedef struct {