| 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 |