29 |
|
need to replace with a working libc call. semtimedop is not present in 2.4.2 and earlier. |
30 |
|
} |
31 |
|
|
32 |
– |
{$IF FPC_FULLVERSION <= 20402 } |
33 |
– |
Function real_semctl(semid:cint; semnum:cint; cmd:cint): cint; cdecl; varargs; external clib name 'semctl'; |
34 |
– |
|
35 |
– |
Function semctl(semid:cint; semnum:cint; cmd:cint; var arg: tsemun): cint; |
36 |
– |
begin |
37 |
– |
semctl := real_semctl(semid,semnum,cmd,pointer(arg)); |
38 |
– |
end; |
39 |
– |
{$IFDEF HAS_SEMTIMEDOP} |
40 |
– |
Function semtimedop(semid:cint; sops: psembuf; nsops: cuint; timeOut: ptimespec): cint; cdecl; external clib name 'semtimedop'; |
41 |
– |
{$ENDIF} |
42 |
– |
Function semget(key:Tkey; nsems:cint; semflg:cint): cint; cdecl; external clib name 'semget'; |
43 |
– |
Function semop(semid:cint; sops: psembuf; nsops: cuint): cint; cdecl; external clib name 'semop'; |
44 |
– |
|
45 |
– |
function GetLastErrno: cint; |
46 |
– |
begin |
47 |
– |
Result := fpgetCerrno |
48 |
– |
end; |
49 |
– |
{$ELSE} |
32 |
|
function GetLastErrno: cint; |
33 |
|
begin |
34 |
|
Result := fpgetErrno |
35 |
|
end; |
36 |
|
|
55 |
– |
{$ENDIF} |
56 |
– |
|
37 |
|
type |
38 |
|
TGlobalInterface = class; |
39 |
|
{Interprocess Communication Objects. All platform dependent IPC is abstracted |