http://d.puremagic.com/issues/show_bug.cgi?id=4370
Summary: POSIX monitor attribute not being used Product: D Version: D2 Platform: All URL: http://dsource.org/projects/tango/ticket/1929 OS/Version: All Status: NEW Keywords: patch Severity: normal Priority: P2 Component: druntime AssignedTo: s...@invisibleduck.org ReportedBy: llu...@gmail.com --- Comment #0 from Leandro Lucarella <llu...@gmail.com> 2010-06-22 20:07:53 PDT --- This is basically the same bug reported to Tango: http://dsource.org/projects/tango/ticket/1929 And then to druntime bug tracker: http://www.dsource.org/projects/druntime/ticket/26 But I guess druntime bugs belongs here instead. So, here it goes: In monitor.c, the POSIX version of _STI_monitor_staticctor() is creating a pthread_mutexattr_t but when init()ializing the actual mutex, the attribute is not passed. I guess this is an error, since there is no point on creating a mutexattr and not using it. Here is the simple patch: --- --- a/monitor.c +++ b/monitor.c @@ -144,7 +144,7 @@ void _STI_monitor_staticctor() { pthread_mutexattr_init(&_monitors_attr); pthread_mutexattr_settype(&_monitors_attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&_monitor_critsec, 0); + pthread_mutex_init(&_monitor_critsec, &_monitors_attr); inited = 1; } } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------