Message ID | CAH6eHdRVpSX9uZaY8fRj9NFmQOR2fCMQe=Xjzyr0x4m9NoOBkQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Mon, Dec 17, 2012 at 3:41 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > libgcc/ghtr.h claims that __gthread_cond_timedwait_recursive should be > defined to support the c++0x thread library, but that function isn't > used or needed anywhere by libstdc++: std::condition_variable can > only be used with std::mutex (i.e. a non-recursive mutex) and > std::condition_variable_any uses a std::mutex internally so only ever > waits on a non-recursive mutex. > > This patch removes the comment saying its required and the unused > gthr-posix.h implementation. > > * gthr.h (__gthread_cond_timedwait_recursive): Do not require. > * gthr-posix.h (__gthread_cond_timedwait_recursive): Remove. > > Tested x86_64-linux, OK for trunk, or should this wait for stage 1? This is OK now. Thanks. Ian
diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h index 1e7ddfe..d357014 100644 --- a/libgcc/gthr-posix.h +++ b/libgcc/gthr-posix.h @@ -880,14 +880,6 @@ __gthread_cond_wait_recursive (__gthread_cond_t *__cond, } static inline int -__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, - __gthread_recursive_mutex_t *__mutex, - const __gthread_time_t *__abs_timeout) -{ - return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); -} - -static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_(pthread_cond_destroy) (__cond); diff --git a/libgcc/gthr.h b/libgcc/gthr.h index 9f2b53d..36804b0 100644 --- a/libgcc/gthr.h +++ b/libgcc/gthr.h @@ -129,9 +129,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see int __gthread_cond_timedwait (__gthread_cond_t *cond, __gthread_mutex_t *mutex, const __gthread_time_t *abs_timeout); - int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond, - __gthread_recursive_mutex_t *mutex, - const __gthread_time_t *abs_time) */