fpc/tests/webtbs/tw7954.pp
Jonas Maebe a5fc8ad63f * adapted test so both throwing an exception and not throwing an exception
is ok (only entercritialsection immediately terminating the problem with
    an error code is wrong), since several OSes apparently don't check the
    validity of the criticalsection

git-svn-id: trunk@8250 -
2007-08-09 07:38:13 +00:00

21 lines
255 B
ObjectPascal

{$ifdef fpc}
{$mode delphi}
{$endif}
uses
{$ifdef unix}
cthreads,
{$endif}
Classes, SysUtils;
var
cs: trtlcriticalsection;
begin
fillchar(cs,sizeof(cs),#255);
try
leavecriticalsection(cs);
except on Exception do
halt(0);
end;
end.