fpc/tests/webtbs/tw15821.pp
Jonas Maebe 4d8f578e4c * when typecasting the result of pthread_self, always call it using
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 -
2010-03-24 21:51:07 +00:00

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.