public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/67408] New: <mutex> assumes that __gthread_mutex_t and__gthread_recursive_mutex_t are the same types
@ 2015-08-31 11:29 sebastian.huber@embedded-brains.de
  2015-09-01 14:49 ` [Bug libstdc++/67408] " redi at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2015-08-31 11:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67408

            Bug ID: 67408
           Summary: <mutex> assumes that __gthread_mutex_t
                    and__gthread_recursive_mutex_t are the same types
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sebastian.huber@embedded-brains.de
  Target Milestone: ---

The problem is in in:

[...]
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
  template<typename _Derived>
    class __timed_mutex_impl
    {
[...]
          auto __mutex = static_cast<_Derived*>(this)->native_handle();
          return !__gthread_mutex_timedlock(__mutex, &__ts);

Here I get this for example:

In file included from
libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:26:0:
libstdc++-v3/include/mutex: In instantiation of 'bool
std::__timed_mutex_impl<_Derived>::_M_try_lock_until(const
std::chrono::time_point<std::chrono::_V2::system_clock, _Duration>&) [with
_Duration = std::chrono::duration<long long int, std::ratio<1ll, 1000000000ll>
>; _Derived = std::recursive_timed_mutex]':
libstdc++-v3/include/mutex:242:55:   required from 'bool
std::__timed_mutex_impl<_Derived>::_M_try_lock_until(const
std::chrono::time_point<_Clock, _Duration>&) [with _Clock =
std::chrono::_V2::steady_clock; _Duration = std::chrono::duration<long long
int, std::ratio<1ll, 1000000000ll> >; _Derived = std::recursive_timed_mutex]'
libstdc++-v3/include/mutex:217:55:   required from 'bool
std::__timed_mutex_impl<_Derived>::_M_try_lock_for(const
std::chrono::duration<_Rep, _Period>&) [with _Rep = long long int; _Period =
std::ratio<1ll>; _Derived = std::recursive_timed_mutex]'
libstdc++-v3/include/mutex:332:39:   required from 'bool
std::recursive_timed_mutex::try_lock_for(const std::chrono::duration<_Rep1,
_Period1>&) [with _Rep = long long int; _Period = std::ratio<1ll>]'
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:39:54:
  required from here
libstdc++-v3/include/mutex:234:37: error: cannot convert
'_Mutex_recursive_Control*' to '__gthread_mutex_t* {aka _Mutex_Control*}' for
argument '1' to 'int __gthread_mutex_timedlock(__gthread_mutex_t*, const
__gthread_time_t*)'
    return !__gthread_mutex_timedlock(__mutex, &__ts);
                                     ^


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-09-02 10:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 11:29 [Bug libstdc++/67408] New: <mutex> assumes that __gthread_mutex_t and__gthread_recursive_mutex_t are the same types sebastian.huber@embedded-brains.de
2015-09-01 14:49 ` [Bug libstdc++/67408] " redi at gcc dot gnu.org
2015-09-01 14:50 ` redi at gcc dot gnu.org
2015-09-01 15:18 ` redi at gcc dot gnu.org
2015-09-01 15:22 ` redi at gcc dot gnu.org
2015-09-01 15:37 ` sebastian.huber@embedded-brains.de
2015-09-01 15:39 ` redi at gcc dot gnu.org
2015-09-02  8:43 ` sebastian.huber@embedded-brains.de
2015-09-02 10:16 ` redi at gcc dot gnu.org
2015-09-02 10:45 ` sebastian.huber@embedded-brains.de
2015-09-02 10:51 ` redi at gcc dot gnu.org
2015-09-02 10:54 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).