On 20 Sep, Gabriel Bouvigne wrote:
>> Read only parts of the structures are no problem, you have just to make
>> sure, parts which can change multiple times (instead only once at
>> initialisation) are propperly protected (you didn't want to read from
>> variables which can't be updated with an atomic operation without a
>> protection (mutex)). Try to seperate these from the write once read many
>> parts of the structs (I thinks this is the difficult part).
>
> I now realize that I perhaps made a mistake in today's commit. In lame.c I'm
> writing to gfp. Is it a problem?
We aren't thread safe, we are only reentrant. So: no, this isn't a
problem in this context. This kind of protection is only needed, if you
want to dissect the encoding function into multiple stages which run in
multiple threads (which may run on multiple CPUs - in this case we have
to minimize data dependencies, because these will slow down the encoding
process because of cache coherency operations of the involved CPUs).
Bye,
Alexander.
--
Actually, Microsoft is sort of a mixture between the Borg and the Ferengi.
http://www.Leidinger.net Alexander @ Leidinger.net
GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
--
MP3 ENCODER mailing list archive is at:
http://www.mail-archive.com/mp3encoder%40minnie.cs.adfa.edu.au/