| yes, I thought something like that would be needed at first, but then
I could not find the manual page for mutex opcode on the windows 5.10
manual.
In other words, we would need to create a new version of trapped to
test it?
Victor
----- Original Message -----
From: "Steven Yi"
To: "Developer discussions"
Sent: Thursday, April 30, 2009 2:01 PM
Subject: Re: [Cs-dev] Spinlocks
Hi Victor,
I'm not sure it is broken, but it does require intervention to
manually protect resources using the mutex opcodes. This is much akin
to what developers do with programming in C, Java, etc. I'd have to
check the problematic orc to see what could be the peoblem, but I'd
guess first thing that mutexes would be necessary.
Steven
On 4/30/09, victor wrote:
> AFAIK --num-threads > 1 is broken. I think I have mentioned this here.
> The reason nothing is being done is because John ffitch has a new
> multithread
> implementation which will replace what is there at the moment.
>
> Victor
> ----- Original Message -----
> From: "Felipe Sateler"
> To: "Developer discussions"
> Sent: Thursday, April 30, 2009 12:10 PM
> Subject: Re: [Cs-dev] Spinlocks
>
>
> Attached is what I get if I run multithreaded "./csound -v --num-threads=2
> examples/trapped.csd".
>
> El 30/04/09 20:53 Felipe Sateler escribió:
>> I am trying to implement the spinlocks with pthreads. However,
>> multithreading does not work for me, there seems to be a race condition
>> somewhere, since it hangs if I run it normally, but not if I run it under
>> gdb. Valgrind says the following:
>>
>> ==24848== Possible data race during write of size 8 at 0x90560c8 by
>> thread
>> #1 ==24848== at 0x40B481: kperf (csound.c:1320)
>> ==24848== by 0x40B8B1: csoundPerform (csound.c:1447)
>> ==24848== by 0x40550E: main (csound_main.c:136)
>> ==24848== This conflicts with a previous read of size 8 by thread #3
>> ==24848== at 0x40AF5D: kperfThread (csound.c:1226)
>> ==24848== by 0x4C27ABF: mythread_wrapper (hg_intercepts.c:194)
>> ==24848== by 0x5092FA9: start_thread (in /lib/libpthread-2.9.so)
>> ==24848== by 0x61C42CC: clone (in /lib/libc-2.9.so)
>>
>>
>> I'm not sure if this is relevant, it is the multiThreadedStart variable
>> that conflicts. Maybe the reads and writes of it should be protected?
>>
>> El 30/04/09 10:22 Felipe Sateler escribió:
>> > Pthreads-w32 (which is what I think you are using on windows) claims to
>> > support it. Can someone from the mac world confirm if they are
>> > available?
>> >
>> > El 30/04/09 01:44 Michael Gogins escribió:
>> > > Insofar as I recall, which may not be all that far, the pthread
>> > > spinlocks were not available on all platforms.
>> > >
>> > > if they are, they would be better, I think.
>> > >
>> > > Regards,
>> > > Mike
>> > >
>> > > On 4/29/09, Felipe Sateler wrote:
>> > > > I have received a report that csound does not build on SPARC
>> > > > machines
>> > > > due to some issues with __sync_* intrinsics. While I am still
>> > > > trying
>> > > > to debug the issue, the question of why these intrinsics were used
>> > > > in
>> > > > the first place was raised. In fact, we already use pthread, and
>> > > > pthread provides spinlocks too. Is there any reason for not using
>> > > > the
>> > > > pthread ones?
>> > > >
>> > > > Saludos,
>> > > > Felipe Sateler
>> >
>> > Saludos,
>> > Felipe Sateler
>>
>> Saludos,
>> Felipe Sateler
>
>
>
> Saludos,
> Felipe Sateler
>
>
>
> --------------------------------------------------------------------------------
>
>
>> ------------------------------------------------------------------------------
>> Register Now & Save for Velocity, the Web Performance & Operations
>> Conference from O'Reilly Media. Velocity features a full day of
>> expert-led, hands-on workshops and two days of sessions from industry
>> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>
>
> --------------------------------------------------------------------------------
>
>
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
--
Sent from my mobile device
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |