| It depends on what is an "atomic operation" that is guaranteed to be performed within one context switch. Normally this means strictly 1 byte and no more read or written. Modern processors have special instructions for atomic read and write of larger data sizes but C and C++ do not have functions to take advantage of this, though Java now does. So, logically and strictly, if you are reading or writing more than 1 byte of shared data you need to lock it.
Regards,
Mike
-----Original Message-----
From: matt
Sent: Oct 14, 2005 6:53 PM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] My csound API wishlist
if you are just writing to the same location in memory i would think
it would be ok.
you'd be using csoundTableSet() or something?
On Oct 14, 2005, at 2:09 PM, Iain Duncan wrote:
>
>
>> api doesnt need to give you that. just spawn a low priority
>> thread and do your file
>> reading or whatever you want to do
>> i myself would never block the csound rendering
>>
>
> Ok, but how does it get into csound? I was already planning on
> doing the file reading in a low priority thread, I'm concerned
> about values that the host comes up with that need to go into a
> csound table, which requires a csound api call. If csound is also
> using that table, don't we have to do that in protected manner? I
> assume we can't just write into a csound table from anyold place if
> csound itself may be both reading and writing that same table.
>
> Thanks
> iain
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
-m@
________________________
matt ingalls
http://sfsound.org/matt.html
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |