mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:59:34 +01:00 
			
		
		
		
	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 -
		
	
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			255 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			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.
 |