threadvars

Top  Previous  Next

What is translated > threadvars

 

In Delphi the keyword threadvar is used to declare variables using the thread-local storage.

 

threadvar

 x: Integer;

 

CBuilder has an according keyword __thread. which could be used:

 

int __thread x;

 

But Delphi2Cpp chooses the equivalent possibility for the same declaration, which also is used by Visual C++,

 

declspec(thread) int x;

 

 

For gcc the declaration is translated as:

 

__thread int x;

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content