mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00

pthread_self(), because it's a procvar under Linux and hence otherwise the value of the procvar instead of the function result will be taken (mantis #15821) git-svn-id: trunk@15049 -
19 lines
339 B
ObjectPascal
19 lines
339 B
ObjectPascal
{$mode objfpc}{$H+}
|
|
|
|
uses
|
|
{$ifdef unix}
|
|
cthreads,
|
|
{$endif}
|
|
Classes;
|
|
|
|
begin
|
|
writeln('GetThreadID=', ptrint(GetThreadID));
|
|
writeln('GetCurrentThreadID=', ptrint(GetCurrentThreadId));
|
|
writeln('MainThreadID=', ptrint(MainThreadID));
|
|
if (GetThreadID<>GetCurrentThreadID) or
|
|
(MainThreadID<>GetThreadID) then
|
|
halt(1);
|
|
end.
|
|
|
|
|