فهرست منبع

Audit pthread.h and exclude prototypes for pthread functions
that are not presently implemented in uClibc's libpthread.
-Erik

Eric Andersen 21 سال پیش
والد
کامیت
8d15864f26
1فایلهای تغییر یافته به همراه29 افزوده شده و 7 حذف شده
  1. 29 7
      include/pthread.h

+ 29 - 7
include/pthread.h

@@ -268,6 +268,9 @@ extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
 				      __attr, void **__restrict __stackaddr)
 				      __attr, void **__restrict __stackaddr)
      __THROW;
      __THROW;
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_XOPEN2K
 #ifdef __USE_XOPEN2K
 /* The following two interfaces are intended to replace the last two.  They
 /* The following two interfaces are intended to replace the last two.  They
    require setting the address as well as the size since only setting the
    require setting the address as well as the size since only setting the
@@ -280,6 +283,7 @@ extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
 				  void **__restrict __stackaddr,
 				  void **__restrict __stackaddr,
 				  size_t *__restrict __stacksize) __THROW;
 				  size_t *__restrict __stacksize) __THROW;
 #endif
 #endif
+#endif
 
 
 /* Add information about the minimum stack size needed for the thread
 /* Add information about the minimum stack size needed for the thread
    to be started.  This size must never be less than PTHREAD_STACK_SIZE
    to be started.  This size must never be less than PTHREAD_STACK_SIZE
@@ -292,10 +296,14 @@ extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
 				      __attr, size_t *__restrict __stacksize)
 				      __attr, size_t *__restrict __stacksize)
      __THROW;
      __THROW;
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_GNU
 #ifdef __USE_GNU
 /* Get thread attributes corresponding to the already running thread TH.  */
 /* Get thread attributes corresponding to the already running thread TH.  */
 extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
 extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
 #endif
 #endif
+#endif
 
 
 /* Functions for scheduling control.  */
 /* Functions for scheduling control.  */
 
 
@@ -319,6 +327,9 @@ extern int pthread_getconcurrency (void) __THROW;
 extern int pthread_setconcurrency (int __level) __THROW;
 extern int pthread_setconcurrency (int __level) __THROW;
 #endif
 #endif
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_GNU
 #ifdef __USE_GNU
 /* Yield the processor to another thread or process.
 /* Yield the processor to another thread or process.
    This function is similar to the POSIX `sched_yield' function but
    This function is similar to the POSIX `sched_yield' function but
@@ -326,6 +337,7 @@ extern int pthread_setconcurrency (int __level) __THROW;
    implementation.  */
    implementation.  */
 extern int pthread_yield (void) __THROW;
 extern int pthread_yield (void) __THROW;
 #endif
 #endif
+#endif
 
 
 /* Functions for mutex handling.  */
 /* Functions for mutex handling.  */
 
 
@@ -453,25 +465,27 @@ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW;
 /* Try to acquire read lock for RWLOCK.  */
 /* Try to acquire read lock for RWLOCK.  */
 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
 
 
-#ifdef __USE_XOPEN2K
-/* Try to acquire read lock for RWLOCK or return after specfied time.  */
-extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
-				       __const struct timespec *__restrict
-				       __abstime) __THROW;
-#endif
-
 /* Acquire write lock for RWLOCK.  */
 /* Acquire write lock for RWLOCK.  */
 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW;
 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW;
 
 
 /* Try to acquire write lock for RWLOCK.  */
 /* Try to acquire write lock for RWLOCK.  */
 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_XOPEN2K
 #ifdef __USE_XOPEN2K
+/* Try to acquire read lock for RWLOCK or return after specfied time.  */
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+				       __const struct timespec *__restrict
+				       __abstime) __THROW;
 /* Try to acquire write lock for RWLOCK or return after specfied time.  */
 /* Try to acquire write lock for RWLOCK or return after specfied time.  */
 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
 				       __const struct timespec *__restrict
 				       __const struct timespec *__restrict
 				       __abstime) __THROW;
 				       __abstime) __THROW;
 #endif
 #endif
+#endif
+
 
 
 /* Unlock RWLOCK.  */
 /* Unlock RWLOCK.  */
 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW;
 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW;
@@ -503,6 +517,9 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
 					  int __pref) __THROW;
 					  int __pref) __THROW;
 #endif
 #endif
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_XOPEN2K
 #ifdef __USE_XOPEN2K
 /* The IEEE Std. 1003.1j-2000 introduces functions to implement
 /* The IEEE Std. 1003.1j-2000 introduces functions to implement
    spinlocks.  */
    spinlocks.  */
@@ -546,6 +563,7 @@ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
 
 
 extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW;
 extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW;
 #endif
 #endif
+#endif
 
 
 
 
 /* Functions for handling thread-specific data.  */
 /* Functions for handling thread-specific data.  */
@@ -647,11 +665,15 @@ extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buff
 #endif
 #endif
 
 
 
 
+#if 0
+/* Not yet implemented in uClibc! */
+
 #ifdef __USE_XOPEN2K
 #ifdef __USE_XOPEN2K
 /* Get ID of CPU-time clock for thread THREAD_ID.  */
 /* Get ID of CPU-time clock for thread THREAD_ID.  */
 extern int pthread_getcpuclockid (pthread_t __thread_id,
 extern int pthread_getcpuclockid (pthread_t __thread_id,
 				  clockid_t *__clock_id) __THROW;
 				  clockid_t *__clock_id) __THROW;
 #endif
 #endif
+#endif
 
 
 
 
 /* Functions for handling signals.  */
 /* Functions for handling signals.  */