Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Spinlocks

Date2008-09-08 18:21
FromMichael Gogins
SubjectRe: [Cs-dev] Spinlocks
Reading is not safe. 

Not if somebody writes bytes 0 and 1 of a float, the OS pauses the writer thread, the reader thread reads all 4 bytes, and the writer resumes and writes bytes 2 and 3.

It would be rare -- but it WILL happen. CLICK.

Regards,
Mike

-----Original Message-----
>From: jpff 
>Sent: Sep 8, 2008 12:01 PM
>To: csound-devel@lists.sourceforge.net
>Subject: [Cs-dev] Spinlocks
>
>Are the spin locks really necessary in the
>in/ins/inq/inh/inq/... opcodes? Surely reading is safe
>==John ffitch
>
>-------------------------------------------------------------------------
>This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>Build the coolest Linux based applications with Moblin SDK & win great prizes
>Grand prize is a trip for two to an Open Source event anywhere in the world
>http://moblin-contest.org/redirect.php?banner_id=100&url=/
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-09-09 16:54
Fromjpff
SubjectRe: [Cs-dev] Spinlocks
If someone writes to the input while opcodes are reading it then there
is something very wrong with the semantics!  In Csound if reading of
input is not thread-safe then the system is bust.  You need it for
channels and zak of course but not in
==John ffitch

Apologies for delay -- my firewall disk collapsed at 4:30am and I have
spent the day rebuilding on a machine without CD or floppy.....

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net