|
@@ -776,15 +776,12 @@ end;
|
|
procedure IntbasiceventSetEvent(state:peventstate);
|
|
procedure IntbasiceventSetEvent(state:peventstate);
|
|
begin
|
|
begin
|
|
pthread_mutex_lock(@plocaleventstate(state)^.feventsection);
|
|
pthread_mutex_lock(@plocaleventstate(state)^.feventsection);
|
|
- Try
|
|
|
|
- plocaleventstate(state)^.Fisset:=true;
|
|
|
|
- if not(plocaleventstate(state)^.FManualReset) then
|
|
|
|
- pthread_cond_signal(@plocaleventstate(state)^.Fcondvar)
|
|
|
|
- else
|
|
|
|
- pthread_cond_broadcast(@plocaleventstate(state)^.Fcondvar);
|
|
|
|
- finally
|
|
|
|
- pthread_mutex_unlock(@plocaleventstate(state)^.feventsection);
|
|
|
|
- end;
|
|
|
|
|
|
+ plocaleventstate(state)^.Fisset:=true;
|
|
|
|
+ if not(plocaleventstate(state)^.FManualReset) then
|
|
|
|
+ pthread_cond_signal(@plocaleventstate(state)^.Fcondvar)
|
|
|
|
+ else
|
|
|
|
+ pthread_cond_broadcast(@plocaleventstate(state)^.Fcondvar);
|
|
|
|
+ pthread_mutex_unlock(@plocaleventstate(state)^.feventsection);
|
|
end;
|
|
end;
|
|
|
|
|
|
function IntbasiceventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
|
|
function IntbasiceventWaitFor(Timeout : Cardinal;state:peventstate) : longint;
|