* more case fixes, mantis #32832 manually done.

git-svn-id: trunk@38865 -
This commit is contained in:
marco 2018-04-29 14:05:09 +00:00
parent 8da8b956b0
commit 8c854cedee
3 changed files with 59 additions and 59 deletions

View File

@ -795,7 +795,7 @@ begin
or assigned(orphaned_freelists.waitvar) or (orphaned_freelists.oscount > 0)) then
begin
{$ifdef FPC_HAS_FEATURE_THREADING}
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
{$endif}
finish_waitfixedlist(@orphaned_freelists);
finish_waitvarlist(@orphaned_freelists);
@ -821,7 +821,7 @@ begin
end;
end;
{$ifdef FPC_HAS_FEATURE_THREADING}
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
{$endif}
end;
if poc = nil then
@ -1105,24 +1105,24 @@ end;
procedure waitfree_fixed(pmc: pmemchunk_fixed; poc: poschunk);
begin
{$ifdef FPC_HAS_FEATURE_THREADING}
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
{$endif}
pmc^.next_fixed := poc^.freelists^.waitfixed;
poc^.freelists^.waitfixed := pmc;
{$ifdef FPC_HAS_FEATURE_THREADING}
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
{$endif}
end;
procedure waitfree_var(pmcv: pmemchunk_var);
begin
{$ifdef FPC_HAS_FEATURE_THREADING}
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
{$endif}
pmcv^.next_var := pmcv^.freelists^.waitvar;
pmcv^.freelists^.waitvar := pmcv;
{$ifdef FPC_HAS_FEATURE_THREADING}
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
{$endif}
end;
@ -1246,11 +1246,11 @@ begin
if loc_freelists^.waitfixed = nil then
exit(false);
{$ifdef FPC_HAS_FEATURE_THREADING}
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
{$endif}
finish_waitfixedlist(loc_freelists);
{$ifdef FPC_HAS_FEATURE_THREADING}
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
{$endif}
result := true;
end;
@ -1274,11 +1274,11 @@ begin
if loc_freelists^.waitvar = nil then
exit;
{$ifdef FPC_HAS_FEATURE_THREADING}
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
{$endif}
finish_waitvarlist(loc_freelists);
{$ifdef FPC_HAS_FEATURE_THREADING}
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
{$endif}
end;
@ -1518,9 +1518,9 @@ var
begin
if heap_lock_use > 0 then
begin
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
inc(heap_lock_use);
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
end;
loc_freelists := @freelists;
fillchar(loc_freelists^,sizeof(tfreelists),0);
@ -1589,7 +1589,7 @@ begin
{$ifdef FPC_HAS_FEATURE_THREADING}
if heap_lock_use > 0 then
begin
entercriticalsection(heap_lock);
EnterCriticalSection(heap_lock);
finish_waitfixedlist(loc_freelists);
finish_waitvarlist(loc_freelists);
end;
@ -1622,9 +1622,9 @@ begin
end;
dec(heap_lock_use);
last_thread := heap_lock_use = 0;
leavecriticalsection(heap_lock);
LeaveCriticalSection(heap_lock);
if last_thread then
donecriticalsection(heap_lock);
DoneCriticalSection(heap_lock);
end;
{$endif}
{$ifdef SHOW_MEM_USAGE}

View File

@ -269,65 +269,65 @@ begin
result:=currenttm.BasicEventCreate(EventAttributes,AManualReset,InitialState, Name);
end;
procedure basiceventdestroy(state:peventstate);
procedure BasicEventDestroy(state:peventstate);
begin
currenttm.basiceventdestroy(state);
currenttm.BasicEventDestroy(state);
end;
procedure basiceventResetEvent(state:peventstate);
procedure BasicEventResetEvent(state:peventstate);
begin
currenttm.basiceventResetEvent(state);
currenttm.BasicEventResetEvent(state);
end;
procedure basiceventSetEvent(state:peventstate);
procedure BasicEventSetEvent(state:peventstate);
begin
currenttm.basiceventSetEvent(state);
currenttm.BasicEventSetEvent(state);
end;
function basiceventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
function BasicEventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
begin
result:=currenttm.basiceventWaitFor(Timeout,state);
result:=currenttm.BasicEventWaitFor(Timeout,state);
end;
function RTLEventCreate :PRTLEvent;
begin
result:=currenttm.rtleventcreate();
result:=currenttm.RTLEventCreate();
end;
procedure RTLeventdestroy(state:pRTLEvent);
procedure RTLeventDestroy(state:pRTLEvent);
begin
currenttm.rtleventdestroy(state);
currenttm.RTLEventDestroy(state);
end;
procedure RTLeventSetEvent(state:pRTLEvent);
begin
currenttm.rtleventsetEvent(state);
currenttm.RTLEventSetEvent(state);
end;
procedure RTLeventResetEvent(state:pRTLEvent);
begin
currenttm.rtleventResetEvent(state);
currenttm.RTLEventResetEvent(state);
end;
procedure RTLeventWaitFor(state:pRTLEvent);
begin
currenttm.rtleventWaitFor(state);
currenttm.RTLEventWaitFor(state);
end;
procedure RTLeventWaitFor(state:pRTLEvent;timeout : longint);
begin
currenttm.rtleventWaitForTimeout(state,timeout);
currenttm.RTLEventWaitForTimeout(state,timeout);
end;
{ ---------------------------------------------------------------------
@ -521,16 +521,16 @@ const
AllocateThreadVars : @NoThreadError;
ReleaseThreadVars : @NoThreadError;
BasicEventCreate : TBasicEventCreateHandler(@NoThreadError);
basiceventdestroy : TBasicEventHandler(@NoThreadError);
basiceventResetEvent : TBasicEventHandler(@NoThreadError);
basiceventSetEvent : TBasicEventHandler(@NoThreadError);
basiceventWaitFor : TBasicEventWaitForHandler(@NoThreadError);
rtlEventCreate : TRTLCreateEventHandler(@NoThreadError);
rtleventdestroy : TRTLEventHandler(@NoThreadError);
rtleventSetEvent : TRTLEventHandler(@NoThreadError);
rtleventResetEvent : TRTLEventHandler(@NoThreadError);
rtleventWaitFor : TRTLEventHandler(@NoThreadError);
rtleventwaitfortimeout : TRTLEventHandlerTimeout(@NoThreadError);
BasicEventdestroy : TBasicEventHandler(@NoThreadError);
BasicEventResetEvent : TBasicEventHandler(@NoThreadError);
BasicEventSetEvent : TBasicEventHandler(@NoThreadError);
BasicEventWaitFor : TBasicEventWaitForHandler(@NoThreadError);
RTLEventCreate : TRTLCreateEventHandler(@NoThreadError);
RTLEventdestroy : TRTLEventHandler(@NoThreadError);
RTLEventSetEvent : TRTLEventHandler(@NoThreadError);
RTLEventResetEvent : TRTLEventHandler(@NoThreadError);
RTLEventWaitFor : TRTLEventHandler(@NoThreadError);
RTLEventwaitfortimeout : TRTLEventHandlerTimeout(@NoThreadError);
{$else EMBEDDED}
BeginThread : @NoBeginThread;
EndThread : @NoEndThread;
@ -553,16 +553,16 @@ const
AllocateThreadVars : @NoThreadError;
ReleaseThreadVars : @NoThreadError;
BasicEventCreate : @NoBasicEventCreate;
basiceventdestroy : @NoBasicEvent;
basiceventResetEvent : @NoBasicEvent;
basiceventSetEvent : @NoBasicEvent;
basiceventWaitFor : @NoBasiceventWaitFor;
rtlEventCreate : @NoRTLEventCreate;
rtleventdestroy : @NoRTLevent;
rtleventSetEvent : @NoRTLevent;
rtleventResetEvent : @NoRTLEvent;
rtleventWaitFor : @NoRTLEvent;
rtleventwaitfortimeout : @NoRTLEventWaitForTimeout;
BasicEventDestroy : @NoBasicEvent;
BasicEventResetEvent : @NoBasicEvent;
BasicEventSetEvent : @NoBasicEvent;
BasicEventWaitFor : @NoBasiceventWaitFor;
RTLEventCreate : @NoRTLEventCreate;
RTLEventDestroy : @NoRTLevent;
RTLEventSetEvent : @NoRTLevent;
RTLEventResetEvent : @NoRTLEvent;
RTLEventWaitFor : @NoRTLEvent;
RTLEventWaitforTimeout : @NoRTLEventWaitForTimeout;
{$endif EMBEDDED}
);

View File

@ -158,15 +158,15 @@ procedure EnterCriticalSection(var cs : TRTLCriticalSection);
procedure LeaveCriticalSection(var cs : TRTLCriticalSection);
function TryEnterCriticalSection(var cs : TRTLCriticalSection):longint;
function BasicEventCreate(EventAttributes : Pointer; AManualReset,InitialState : Boolean;const Name : ansistring):pEventState;
procedure basiceventdestroy(state:peventstate);
procedure basiceventResetEvent(state:peventstate);
procedure basiceventSetEvent(state:peventstate);
function basiceventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
procedure BasicEventDestroy(state:peventstate);
procedure BasicEventResetEvent(state:peventstate);
procedure BasicEventSetEvent(state:peventstate);
function BasicEventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
function RTLEventCreate :PRTLEvent;
procedure RTLeventdestroy(state:pRTLEvent);
procedure RTLeventSetEvent(state:pRTLEvent);
procedure RTLeventResetEvent(state:pRTLEvent);
procedure RTLeventWaitFor(state:pRTLEvent);
procedure RTLeventWaitFor(state:pRTLEvent;timeout : longint);
procedure RTLEventDestroy(state:pRTLEvent);
procedure RTLEventSetEvent(state:pRTLEvent);
procedure RTLEventResetEvent(state:pRTLEvent);
procedure RTLEventWaitFor(state:pRTLEvent);
procedure RTLEventWaitFor(state:pRTLEvent;timeout : longint);