[packages/crossnacl-newlib] up to 2.0.0 (git 07af971)

glen glen at pld-linux.org
Thu Mar 6 20:50:12 CET 2014


commit 170d78e8b77a348479aad44339d748b0f7540517
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Feb 24 21:53:28 2014 +0200

    up to 2.0.0 (git 07af971)

 crossnacl-newlib.spec | 13 +++++++------
 pthread.h             | 23 ++++++++++++++++++-----
 2 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/crossnacl-newlib.spec b/crossnacl-newlib.spec
index 3f608c5..0d9747f 100644
--- a/crossnacl-newlib.spec
+++ b/crossnacl-newlib.spec
@@ -1,14 +1,15 @@
-%define		gitver 5feee65
+%define		rel		1
+%define		gitver	07af971
 Summary:	C library intended for use on embedded systems
 Name:		crossnacl-newlib
-Version:	1.20.0
-Release:	5.git%{gitver}
+Version:	2.0.0
+Release:	0.git%{gitver}.%{rel}
 License:	BSD and MIT and LGPL v2+
 Group:		Libraries
 Source0:	nacl-newlib-%{version}-git%{gitver}.tar.xz
-# Source0-md5:	18a0d0c7058903c35f2ef5f140fd53dc
-Source1:	nacl-headers-27.0.1453.93.tar.xz
-# Source1-md5:	1718b8b1fb5f5354002469413352c679
+# Source0-md5:	2e8b05e7ebe9eefa3e0d3f6d0ab23a1e
+Source1:	nacl-headers-33.0.1750.117.tar.xz
+# Source1-md5:	26f4e73044f01cbe0b89bec7fa4deea1
 Source2:	newlib-libc-script
 Source3:	pthread.h
 Source4:	get-source.sh
diff --git a/pthread.h b/pthread.h
index 70c551f..fc46fc0 100644
--- a/pthread.h
+++ b/pthread.h
@@ -66,7 +66,7 @@ typedef struct {
    * mutex_state is either UNLOCKED (0), LOCKED_WITHOUT_WAITERS (1) or
    * LOCKED_WITH_WAITERS (2).  See "enum MutexState".
    */
-  int mutex_state;
+  volatile int mutex_state;
 
   /**
    * The kind of mutex:
@@ -201,13 +201,9 @@ extern int pthread_mutex_trylock(pthread_mutex_t *mutex);
 */
 extern int pthread_mutex_lock(pthread_mutex_t *mutex);
 
-/* TODO(gregoryd) - depends on implementation */
-#if 0
 /* Wait until lock becomes available, or specified time passes. */
-/* TODO(gregoryd): consider implementing this function. */
 extern int pthread_mutex_timedlock(pthread_mutex_t *mutex,
                                    struct timespec *abstime);
-#endif
 
 /** @nqPosix
 * Unlocks a mutex.
@@ -571,6 +567,23 @@ extern int pthread_attr_setstacksize(pthread_attr_t *attr,
 extern int pthread_attr_getstacksize(pthread_attr_t *attr,
                                      size_t *stacksize);
 
+/** @nqPosix
+ * Gets the maximum address of the stack (assuming stacks grow
+ * downwards) of the given thread.
+ *
+ * If the given thread exits concurrently with the call to this
+ * function, the behaviour is undefined.
+ *
+ * Note that in the future this may be removed and replaced with an
+ * implementation of pthread_getattr_np(), for consistency with Linux
+ * glibc.  pthread_getattr_np() + pthread_attr_getstack() return the
+ * stack base (minimum) address and stack size.  However, that is
+ * currently unimplementable under NaCl, because NaCl does not provide
+ * a way to determine the initial thread's stack size.  See:
+ * https://code.google.com/p/nativeclient/issues/detail?id=3431
+ */
+extern int pthread_get_stack_end_np(pthread_t tid, void **stack_end);
+
 /* Functions for handling thread-specific data.  */
 
 /** Thread-specific key identifier type */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossnacl-newlib.git/commitdiff/170d78e8b77a348479aad44339d748b0f7540517



More information about the pld-cvs-commit mailing list