]> git.llucax.com Git - personal/website.git/blob - source/blog/posts/2010/10/10-trying-cdgc-howto/0002-Use-the-mutexattr-when-initializing-the-mutex.patch
blog: Publish post about LANGUAGE
[personal/website.git] / source / blog / posts / 2010 / 10 / 10-trying-cdgc-howto / 0002-Use-the-mutexattr-when-initializing-the-mutex.patch
1 From d8664da343dcdd83fd0ce994cbcb5d34ebcf8677 Mon Sep 17 00:00:00 2001
2 From: Leandro Lucarella <llucax@gmail.com>
3 Date: Mon, 14 Jun 2010 00:23:29 -0300
4 Subject: [PATCH 2/4] Use the mutexattr when initializing the mutex
5
6 ---
7  tango/core/rt/compiler/dmd/monitor.c |    2 +-
8  1 files changed, 1 insertions(+), 1 deletions(-)
9
10 diff --git a/tango/core/rt/compiler/dmd/monitor.c b/tango/core/rt/compiler/dmd/monitor.c
11 index 66ee482..6e779a1 100644
12 --- a/tango/core/rt/compiler/dmd/monitor.c
13 +++ b/tango/core/rt/compiler/dmd/monitor.c
14 @@ -144,7 +144,7 @@ void _STI_monitor_staticctor()
15      {
16          pthread_mutexattr_init(&_monitors_attr);
17          pthread_mutexattr_settype(&_monitors_attr, PTHREAD_MUTEX_RECURSIVE);
18 -        pthread_mutex_init(&_monitor_critsec, 0);
19 +        pthread_mutex_init(&_monitor_critsec, &_monitors_attr);
20          inited = 1;
21      }
22  }
23 -- 
24 1.7.1
25