[Lazarus] Rescan FPC sources crashes Lazarus

Sven Barth pascaldragon at googlemail.com
Sat Mar 26 22:21:27 CET 2011


On 26.03.2011 22:01, Mattias Gaertner wrote:
> On Sat, 26 Mar 2011 21:47:24 +0100
> Sven Barth<pascaldragon at googlemail.com>  wrote:
>
>> On 26.03.2011 20:07, Florian Klämpfl wrote:
>>> Am 26.03.2011 19:36, schrieb Hans-Peter Diettrich:
>>>>> Making IsMultiThreaded a function is a no-no: it is used in really
>>>>> speed critical code paths and using an inline function neither because
>>>>> it's used mostly in assembler code
>>>>
>>>> Simple solution: the variable continues to exist, under a different
>>>> name. The property only implements Delphi compatibility :-)
>>>
>>> Possible, but I fear this is also only half of a solution: a property
>>> cannot replace a variable, see var parameter problem or assembler code.
>>
>> What about the following solution:
>>
>> * add a variable in the implementation section of system.pp that will be
>> the real workhorse for "should the RTL be threadsafe" (basically what
>> IsMultiThread is now)
>> * when setting that private variable also set the "old" IsMultiThread
>> variable (but never read it inside the RTL)
>> * provide a setter function for the private "should the RTL be
>> threadsafe" variable and document it with a big warning that it is only
>> for use inside a thread manager.
>
> And how can other code check it fast?

Now I get what Florian ment with the "time critical" part... In that 
case it's indeed not a good solution. Sorry for the noise.

Regards,
Sven




More information about the Lazarus mailing list