|
@@ -4,7 +4,7 @@
|
|
Copyright (c) 1998 by the Free Pascal development team
|
|
Copyright (c) 1998 by the Free Pascal development team
|
|
|
|
|
|
This file implements IPC calls calls for Linux
|
|
This file implements IPC calls calls for Linux
|
|
-
|
|
|
|
|
|
+
|
|
See the file COPYING.FPC, included in this distribution,
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
for details about the copyright.
|
|
|
|
|
|
@@ -25,12 +25,12 @@ interface
|
|
Var
|
|
Var
|
|
IPCError : longint;
|
|
IPCError : longint;
|
|
|
|
|
|
-Type
|
|
|
|
|
|
+Type
|
|
TKey = Longint;
|
|
TKey = Longint;
|
|
PULong = ^Cardinal;
|
|
PULong = ^Cardinal;
|
|
PWord = ^Word;
|
|
PWord = ^Word;
|
|
-
|
|
|
|
-Const
|
|
|
|
|
|
+
|
|
|
|
+Const
|
|
{ IPC flags for get calls }
|
|
{ IPC flags for get calls }
|
|
|
|
|
|
IPC_CREAT = 1 shl 9; { create if key is nonexistent }
|
|
IPC_CREAT = 1 shl 9; { create if key is nonexistent }
|
|
@@ -48,12 +48,12 @@ type
|
|
PIPC_Perm = ^TIPC_Perm;
|
|
PIPC_Perm = ^TIPC_Perm;
|
|
TIPC_Perm = record
|
|
TIPC_Perm = record
|
|
key : TKey;
|
|
key : TKey;
|
|
- uid,
|
|
|
|
|
|
+ uid,
|
|
gid,
|
|
gid,
|
|
cuid,
|
|
cuid,
|
|
cgid,
|
|
cgid,
|
|
mode,
|
|
mode,
|
|
- seq : Word;
|
|
|
|
|
|
+ seq : Word;
|
|
end;
|
|
end;
|
|
|
|
|
|
{ Function to generate a IPC key. }
|
|
{ Function to generate a IPC key. }
|
|
@@ -63,8 +63,8 @@ Function ftok (Path : String; ID : char) : TKey;
|
|
Shared memory stuff
|
|
Shared memory stuff
|
|
----------------------------------------------------------------------}
|
|
----------------------------------------------------------------------}
|
|
|
|
|
|
-Type
|
|
|
|
- PShmid_DS = ^TShmid_ds;
|
|
|
|
|
|
+Type
|
|
|
|
+ PShmid_DS = ^TShmid_ds;
|
|
TShmid_ds = record
|
|
TShmid_ds = record
|
|
shm_perm : TIPC_Perm;
|
|
shm_perm : TIPC_Perm;
|
|
shm_segsz : longint;
|
|
shm_segsz : longint;
|
|
@@ -163,7 +163,7 @@ type
|
|
msgseg : Word;
|
|
msgseg : Word;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Function msgget(key: TKey; msgflg:longint):longint;
|
|
|
|
|
|
+Function msgget(key: TKey; msgflg:longint):longint;
|
|
Function msgsnd(msqid:longint; msgp: PMSGBuf; msgsz: longint; msgflg:longint): Boolean;
|
|
Function msgsnd(msqid:longint; msgp: PMSGBuf; msgsz: longint; msgflg:longint): Boolean;
|
|
Function msgrcv(msqid:longint; msgp: PMSGBuf; msgsz: longint; msgtyp:longint; msgflg:longint): Boolean;
|
|
Function msgrcv(msqid:longint; msgp: PMSGBuf; msgsz: longint; msgtyp:longint; msgflg:longint): Boolean;
|
|
Function msgctl(msqid:longint; cmd: longint; buf: PMSQid_ds): Boolean;
|
|
Function msgctl(msqid:longint; cmd: longint; buf: PMSQid_ds): Boolean;
|
|
@@ -295,7 +295,7 @@ function shmat (shmid:longint; shmaddr:pchar; shmflg:longint): pchar;
|
|
|
|
|
|
Var raddr : pchar;
|
|
Var raddr : pchar;
|
|
error : longint;
|
|
error : longint;
|
|
-
|
|
|
|
|
|
+
|
|
begin
|
|
begin
|
|
error:=ipccall(CALL_SHMAT,shmid,shmflg,longint(@raddr),shmaddr);
|
|
error:=ipccall(CALL_SHMAT,shmid,shmflg,longint(@raddr),shmaddr);
|
|
If Error<0 then
|
|
If Error<0 then
|
|
@@ -334,7 +334,7 @@ Type
|
|
msgtyp : longint;
|
|
msgtyp : longint;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Var
|
|
|
|
|
|
+Var
|
|
tmp : TIPC_Kludge;
|
|
tmp : TIPC_Kludge;
|
|
|
|
|
|
begin
|
|
begin
|
|
@@ -367,3 +367,9 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
end.
|
|
end.
|
|
|
|
+{
|
|
|
|
+ $Log$
|
|
|
|
+ Revision 1.6 1999-05-27 21:38:31 peter
|
|
|
|
+ * log inserted
|
|
|
|
+
|
|
|
|
+}
|