mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 21:49:06 +02:00
* throw an error if RTLEventCreate() fails on Unix
git-svn-id: trunk@28964 -
This commit is contained in:
parent
79a40547ca
commit
35a313d98c
@ -874,8 +874,19 @@ var p:pintrtlevent;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
new(p);
|
new(p);
|
||||||
pthread_cond_init(@p^.condvar, nil);
|
if not assigned(p) then
|
||||||
pthread_mutex_init(@p^.mutex, nil);
|
fpc_threaderror;
|
||||||
|
if pthread_cond_init(@p^.condvar, nil)<>0 then
|
||||||
|
begin
|
||||||
|
dispose(p);
|
||||||
|
fpc_threaderror;
|
||||||
|
end;
|
||||||
|
if pthread_mutex_init(@p^.mutex, nil)<>0 then
|
||||||
|
begin
|
||||||
|
pthread_cond_destroy(@p^.condvar);
|
||||||
|
dispose(p);
|
||||||
|
fpc_threaderror;
|
||||||
|
end;
|
||||||
p^.isset:=false;
|
p^.isset:=false;
|
||||||
result:=PRTLEVENT(p);
|
result:=PRTLEVENT(p);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user