diff --git a/gemdos/gemdos.u b/gemdos/gemdos.u index 4a690ab62..a3592b84f 100644 --- a/gemdos/gemdos.u +++ b/gemdos/gemdos.u @@ -2131,6 +2131,7 @@ bios ~ xbios ~ GEMDOS ~ (!link [Dispatcher][GEMDOS-Dispatcher]) !include gemdos/memory/memory.u !include gemdos/network/network.u !include gemdos/system/system.u +!include gemdos/sysv/sysv.u !include gemdos/dir/dir.u !include gemdos/chrinout/chrinout.u !include gemdos/mintnet/mintnet.u diff --git a/gemdos/structures/ipc_perm.ui b/gemdos/structures/ipc_perm.ui new file mode 100644 index 000000000..d431523df --- /dev/null +++ b/gemdos/structures/ipc_perm.ui @@ -0,0 +1,55 @@ +!iflang [english] + +!begin_node ipc_perm + +!begin_verbatim +/* Permission structure used with System V IPC */ +struct ipc_perm +{ + int16_t uid; /* user id */ + int16_t gid /* group id */ + int16_t cuid; /* creator user id */ + int16_t cgid; /* creator group id */ + int32_t mode; /* r/w permission */ + /* + * These members are private and used only in the + * internal implementation of this interface. + */ + uint32_t _seq; /* sequence */ + int32_t _key; /* user specified msg/sem/shm key */ +}; +!end_verbatim + +See also: (!link [struct msqid_ds][msqid_ds]) ~ +(!link [struct semid_ds][semid_ds]) ~ (!link [struct shmid_ds][shmid_ds]) ~ +System V IPC +!end_node + +!else + +!begin_node ipc_perm + +!begin_verbatim +/* Permission structure used with System V IPC */ +struct ipc_perm +{ + int16_t uid; /* user id */ + int16_t gid /* group id */ + int16_t cuid; /* creator user id */ + int16_t cgid; /* creator group id */ + int32_t mode; /* r/w permission */ + /* + * These members are private and used only in the + * internal implementation of this interface. + */ + uint32_t _seq; /* sequence */ + int32_t _key; /* user specified msg/sem/shm key */ +}; +!end_verbatim + +Querverweis: (!link [struct msqid_ds][msqid_ds]) ~ +(!link [struct semid_ds][semid_ds]) ~ (!link [struct shmid_ds][shmid_ds]) ~ +System V IPC +!end_node + +!endif diff --git a/gemdos/structures/msgbuf.ui b/gemdos/structures/msgbuf.ui new file mode 100644 index 000000000..82bfb5680 --- /dev/null +++ b/gemdos/structures/msgbuf.ui @@ -0,0 +1,33 @@ +!iflang [english] + +!begin_node msgbuf + +!begin_verbatim +/* Struct to be used as argument for msgsnd and msgrcv */ +struct msgbuf +{ + int32_t mtype; /* type of received/sent message */ + int8_t mtext[1]; /* text of the message */ +}; +!end_verbatim + +See also: Pmsgrcv ~ Pmsgsnd ~ System V IPC +!end_node + +!else + +!begin_node msgbuf + +!begin_verbatim +/* Struct to be used as argument for msgsnd and msgrcv */ +struct msgbuf +{ + int32_t mtype; /* type of received/sent message */ + int8_t mtext[1]; /* text of the message */ +}; +!end_verbatim + +Querverweis: Pmsgrcv ~ Pmsgsnd ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/msqid_ds.ui b/gemdos/structures/msqid_ds.ui new file mode 100644 index 000000000..d5248eec8 --- /dev/null +++ b/gemdos/structures/msqid_ds.ui @@ -0,0 +1,49 @@ +!iflang [english] + +!begin_node msqid_ds + +!begin_verbatim +typedef uint16_t msgqnum_t; +typedef uint16_t msglen_t; +/* structure used with System V message queue */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* operation permission */ + time_t msg_stime; /* time of last msgsnd command */ + time_t msg_rtime; /* time of last msgrcv command */ + time_t msg_ctime; /* time of last change */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + pid_t msg_lspid; /* pid of last msgsnd */ + pid_t msg_lrpid; /* pid of last msgrcv */ +}; +!end_verbatim + +See also: Pmsgctl ~ System V IPC +!end_node + +!else + +!begin_node msqid_ds + +!begin_verbatim +typedef uint16_t msgqnum_t; +typedef uint16_t msglen_t; +/* structure used with System V message queue */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* operation permission */ + time_t msg_stime; /* time of last msgsnd command */ + time_t msg_rtime; /* time of last msgrcv command */ + time_t msg_ctime; /* time of last change */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + pid_t msg_lspid; /* pid of last msgsnd */ + pid_t msg_lrpid; /* pid of last msgrcv */ +}; +!end_verbatim + +Querverweis: Pmsgctl ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/sem.ui b/gemdos/structures/sem.ui new file mode 100644 index 000000000..ad4b19ba5 --- /dev/null +++ b/gemdos/structures/sem.ui @@ -0,0 +1,37 @@ +!iflang [english] + +!begin_node __sem + +!begin_verbatim +/* semaphore structure */ +struct __sem +{ + uint16_t semval; /* semaphore value */ + int16_t sempid; /* pid of last operation */ + uint16_t semncnt; /* # awaiting semval > cval */ + uint16_t semzcnt; /* # awaiting semval = 0 */ +}; +!end_verbatim + +See also: (!link [struct semid_ds][semid_ds]) ~ System V IPC +!end_node + +!else + +!begin_node __sem + +!begin_verbatim +/* semaphore structure */ +struct __sem +{ + uint16_t semval; /* semaphore value */ + int16_t sempid; /* pid of last operation */ + uint16_t semncnt; /* # awaiting semval > cval */ + uint16_t semzcnt; /* # awaiting semval = 0 */ +}; +!end_verbatim + +Querverweis: (!link [struct semid_ds][semid_ds]) ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/sembuf.ui b/gemdos/structures/sembuf.ui new file mode 100644 index 000000000..71a222e70 --- /dev/null +++ b/gemdos/structures/sembuf.ui @@ -0,0 +1,37 @@ +!iflang [english] + +!begin_node sembuf + +!begin_verbatim +/* semop's sops parameter structure */ +struct sembuf +{ + uint16_t sem_num; /* semaphore # */ + int16_t sem_op; /* semaphore operation */ + int16_t sem_flg; /* operation flags */ +}; +#define SEM_UNDO 010000 /* undo changes on process exit */ +!end_verbatim + +See also: Psemop ~ System V IPC +!end_node + +!else + +!begin_node sembuf + +!begin_verbatim +/* semop's sops parameter structure */ +struct sembuf +{ + uint16_t sem_num; /* semaphore # */ + int16_t sem_op; /* semaphore operation */ + int16_t sem_flg; /* operation flags */ +}; +#define SEM_UNDO 010000 /* undo changes on process exit */ +!end_verbatim + +Querverweis: Psemop ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/semid_ds.ui b/gemdos/structures/semid_ds.ui new file mode 100644 index 000000000..1ea7e4e7d --- /dev/null +++ b/gemdos/structures/semid_ds.ui @@ -0,0 +1,45 @@ +!iflang [english] + +!begin_node semid_ds + +!begin_verbatim +/* structure used with System V semaphores */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + struct __sem *sem_base; /* pointer to first semaphore in set */ + uint16_t sem_nsems; /* number of sems in set */ + int32_t sem_otime; /* last operation time */ + int32_t sem_pad1; /* SVABI/386 says I need this here */ + int32_t sem_ctime; /* last change time */ + /* 00:00:00 GMT, Jan. 1, 1970 */ + int32_t sem_pad2d; /* SVABI/386 says I need this here */ + int32_t sem_pad3[4]; /* SVABI/386 says I need this here */ +}; +!end_verbatim +See also: Psemctl ~ (!link [union semun][semun]) ~ System V IPC +!end_node + +!else + +!begin_node semid_ds + +!begin_verbatim +/* structure used with System V semaphores */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + struct __sem *sem_base; /* pointer to first semaphore in set */ + uint16_t sem_nsems; /* number of sems in set */ + int32_t sem_otime; /* last operation time */ + int32_t sem_pad1; /* SVABI/386 says I need this here */ + int32_t sem_ctime; /* last change time */ + /* 00:00:00 GMT, Jan. 1, 1970 */ + int32_t sem_pad2d; /* SVABI/386 says I need this here */ + int32_t sem_pad3[4]; /* SVABI/386 says I need this here */ +}; +!end_verbatim +Querverweis: Psemctl ~ (!link [union semun][semun]) ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/seminfo.ui b/gemdos/structures/seminfo.ui new file mode 100644 index 000000000..0a1e62322 --- /dev/null +++ b/gemdos/structures/seminfo.ui @@ -0,0 +1,49 @@ +!iflang [english] + +!begin_node seminfo + +!begin_verbatim +/* semaphore info structure */ +struct seminfo +{ + int32_t semmap; /* # of entries in semaphore map */ + int32_t semmni; /* # of semaphore identifiers */ + int32_t semmns; /* # of semaphores in system */ + int32_t semmnu; /* # of undo structures in system */ + int32_t semmsl; /* max # of semaphores per id */ + int32_t semopm; /* max # of operations per semop call */ + int32_t semume; /* max # of undo entries per process */ + int32_t semusz; /* size in bytes of undo structure */ + int32_t semvmx; /* semaphore maximum value */ + int32_t semaem; /* adjust on exit max value */ +}; +!end_verbatim + +See also: Psemctl ~ (!link [union semun][semun]) ~ System V IPC +!end_node + +!else + +!begin_node seminfo + +!begin_verbatim +/* semaphore info structure */ +struct seminfo +{ + int32_t semmap; /* # of entries in semaphore map */ + int32_t semmni; /* # of semaphore identifiers */ + int32_t semmns; /* # of semaphores in system */ + int32_t semmnu; /* # of undo structures in system */ + int32_t semmsl; /* max # of semaphores per id */ + int32_t semopm; /* max # of operations per semop call */ + int32_t semume; /* max # of undo entries per process */ + int32_t semusz; /* size in bytes of undo structure */ + int32_t semvmx; /* semaphore maximum value */ + int32_t semaem; /* adjust on exit max value */ +}; +!end_verbatim + +Querverweis: Psemctl ~ (!link [union semun][semun]) ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/semun.ui b/gemdos/structures/semun.ui new file mode 100644 index 000000000..4fb135e0f --- /dev/null +++ b/gemdos/structures/semun.ui @@ -0,0 +1,37 @@ +!iflang [english] + +!begin_node semun + +!begin_verbatim +/* union used with System V semaphore control operations */ +union semun +{ + int32_t val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + uint16_t *array; /* array for GETALL & SETALL */ + struct seminfo *__buf; /* buffer for IPC_INFO */ +}; +!end_verbatim + +See also: Psemctl ~ System V IPC +!end_node + +!else + +!begin_node semun + +!begin_verbatim +/* union used with System V semaphore control operations */ +union semun +{ + int32_t val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + uint16_t *array; /* array for GETALL & SETALL */ + struct seminfo *__buf; /* buffer for IPC_INFO */ +}; +!end_verbatim + +Querverweis: Psemctl ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/shmid_ds.ui b/gemdos/structures/shmid_ds.ui new file mode 100644 index 000000000..08fcdeb75 --- /dev/null +++ b/gemdos/structures/shmid_ds.ui @@ -0,0 +1,47 @@ +!iflang [english] + +!begin_node shmid_ds + +!begin_verbatim +typedef uint16_t shmatt_t; +/* structure used with System V shared memory segment */ +struct shmid_ds +{ + struct ipc_perm shm_perm; /* operation permission */ + int32_t shm_segsz; /* size of segment in bytes */ + time_t shm_atime; /* time of last shmat command */ + time_t shm_dtime; /* time of last shmdt command */ + time_t shm_ctime; /* time of last change by shmctl */ + pid_t shm_cpid; /* pid of creator */ + pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +}; +!end_verbatim + +See also: Pshmctl ~ System V IPC +!end_node + +!else + +!begin_node shmid_ds + +!begin_verbatim +typedef uint16_t shmatt_t; +/* structure used with System V shared memory segment */ +struct shmid_ds +{ + struct ipc_perm shm_perm; /* operation permission */ + int32_t shm_segsz; /* size of segment in bytes */ + time_t shm_atime; /* time of last shmat command */ + time_t shm_dtime; /* time of last shmdt command */ + time_t shm_ctime; /* time of last change by shmctl */ + pid_t shm_cpid; /* pid of creator */ + pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +}; +!end_verbatim + +Querverweis: Pshmctl ~ System V IPC +!end_node + +!endif diff --git a/gemdos/structures/structures.u b/gemdos/structures/structures.u index 166dad87b..9b5d73e70 100644 --- a/gemdos/structures/structures.u +++ b/gemdos/structures/structures.u @@ -27,14 +27,23 @@ !include gemdos/structures/FILEPTR.ui !include gemdos/structures/flock.ui !include gemdos/structures/iovec.ui +!include gemdos/structures/ipc_perm.ui !include gemdos/structures/LINE.ui !include gemdos/structures/ltchars.ui +!include gemdos/structures/msgbuf.ui !include gemdos/structures/msghdr.ui +!include gemdos/structures/msqid_ds.ui !include gemdos/structures/mutimbuf.ui !include gemdos/structures/PD.ui !include gemdos/structures/POLLFD.ui !include gemdos/structures/ploadinfo.ui +!include gemdos/structures/sem.ui +!include gemdos/structures/sembuf.ui +!include gemdos/structures/semid_ds.ui +!include gemdos/structures/seminfo.ui +!include gemdos/structures/semun.ui !include gemdos/structures/sgttyb.ui +!include gemdos/structures/shmid_ds.ui !include gemdos/structures/sigaction.ui !include gemdos/structures/sockaddr.ui !include gemdos/structures/STAT.ui diff --git a/gemdos/sysv/pmsgctl.ui b/gemdos/sysv/pmsgctl.ui new file mode 100644 index 000000000..b4197e822 --- /dev/null +++ b/gemdos/sysv/pmsgctl.ui @@ -0,0 +1,158 @@ +!iflang [english] + +!begin_node Pmsgctl +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Message queue control operations(!ldouble) - Perform a control +operation on a message queue. + +!item [Opcode:] +377 + +!item [Syntax:] +int32_t Pmsgctl ( int32_t msqid, int32_t cmd, struct msqid_ds *buf ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pmsgctl perfoms a control operation on a System V +message queue. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the message queue identified by +(!I)msqid(!i) into the structure pointed to by (!I)buf(!i) +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)buf(!i) to the structure +associated with the message queue identified by (!I)msqid(!i) +!item [IPC_RMID (0)] +Immediately remove the message queue identified by (!I)msqid(!i). (!I)buf(!i) +is ignored +!end_xlist +!item [buf] +Pointer to a msqid_ds structure +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns E_OK on success or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pmsgctl]) ~ Pmsgget ~ Pmsgrcv ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings for Pmsgctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgctl ( int32_t msqid, int32_t cmd, struct msqid_ds *buf ); + +!item [Assembler:] +!begin_verbatim +pea buf ; Offset 10 +move.l cmd,-(sp) ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #377,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pmsgctl +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Message Queue Control Operations(!ldouble) - Perform a control +operation on a message queue. + +!item [Gemdosnummer:] +377 + +!item [Deklaration:] +int32_t Pmsgctl ( int32_t msqid, int32_t cmd, struct msqid_ds *buf ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pmsgctl perfoms a control operation on a System V +message queue. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the message queue identified by +(!I)msqid(!i) into the structure pointed to by (!I)buf(!i) +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)buf(!i) to the structure +associated with the message queue identified by (!I)msqid(!i) +!item [IPC_RMID (0)] +Immediately remove the message queue identified by (!I)msqid(!i). (!I)buf(!i) +is ignored +!end_xlist +!item [buf] +Pointer to a msqid_ds structure +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns E_OK on success or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pmsgctl]) ~ Pmsgget ~ Pmsgrcv ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pmsgctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgctl ( int32_t msqid, int32_t cmd, struct msqid_ds *buf ); + +!item [Assembler:] +!begin_verbatim +pea buf ; Offset 10 +move.l cmd,-(sp) ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #377,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 14(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pmsgget.ui b/gemdos/sysv/pmsgget.ui new file mode 100644 index 000000000..cd4e46c0b --- /dev/null +++ b/gemdos/sysv/pmsgget.ui @@ -0,0 +1,142 @@ +!iflang [english] + +!begin_node Pmsgget +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Get message queue identifier(!ldouble) - Get a message queue +identifier. + +!item [Opcode:] +376 + +!item [Syntax:] +int32_t Pmsgget ( int32_t key, int32_t msgflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pmsgget returns a message queue identifier from +an existing message queue or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Allows to specify an existing message queue, or allows to create a new one. +A new message queue is created if (!I)key(!i) is IPC_PRIVATE (0), or if (!I)key(!i) +is not IPC_PRIVATE, message queue (!I)key(!i) does not exist and IPC_CREAT is +specified in (!I)msgflg(!i). +!item [msgflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)msgflg(!i) and a message queue (!I)key(!i) already exists, the function +returns EEXIST. +The least significant 9 bits specify the permissions (see Fchmod). +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns a nonnegative message queue identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pmsgget]) ~ Pmsgctl ~ Pmsgrcv ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings for Pmsgget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgget ( int32_t key, int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #376,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 10(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pmsgget +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Get (!nolink [Message]) Queue Identifier(!ldouble) - Get a message queue +identifier. + +!item [Gemdosnummer:] +376 + +!item [Deklaration:] +int32_t Pmsgget ( int32_t key, int32_t msgflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pmsgget returns a message queue identifier from +an existing message queue or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Allows to specify an existing message queue, or allows to create a new one. +A new message queue is created if (!I)key(!i) is IPC_PRIVATE (0), or if (!I)key(!i) +is not IPC_PRIVATE, message queue (!I)key(!i) does not exist and IPC_CREAT is +specified in (!I)msgflg(!i). +!item [msgflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)msgflg(!i) and a message queue (!I)key(!i) already exists, the function +returns EEXIST. +The least significant 9 bits specify the permissions (see Fchmod). +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns a nonnegative message queue identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pmsgget]) ~ Pmsgctl ~ Pmsgrcv ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pmsgget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgget ( int32_t key, int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #376,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 10(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pmsgrcv.ui b/gemdos/sysv/pmsgrcv.ui new file mode 100644 index 000000000..12d2f01ea --- /dev/null +++ b/gemdos/sysv/pmsgrcv.ui @@ -0,0 +1,170 @@ +!iflang [english] + +!begin_node Pmsgrcv +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Receive from message queue(!ldouble) - Read a message from a message queue. + +!item [Opcode:] +379 + +!item [Syntax:] +int32_t Pmsgrcv ( int32_t msqid, void *msgp, int32_t msgsz, + int32_t msgtyp, int32_t msgflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pmsgrcv removes a message from the +message queue identified by (!I)msqid(!i) and stores it into the structure +pointed to by (!I)pmsg(!i). The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [msgp] +Pointer to a msgbuf structure +!item [msgsz] +(!nolink [Size]) of message data to read +!item [msgtyp] +(!nolink [Message]) type +!item [msgflg] +Flags: +!begin_xlist [IPC_NOWAIT (0x0800)] !compressed +!item [IPC_NOWAIT (0x0800)] +(!nolink [Return]) immediately if there is no message in the message queue +!item [(!nolink [MSG_EXCEPT])] +If (!I)msgtyp(!i) is greater than 0, then read the first message with message +type that differs from (!I)msgtyp(!i) +!item [(!nolink [MSG_NOERROR])] +Truncate the message text if longer than (!I)msgsz(!i) bytes +!end_xlist +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Number of bytes copied into the (!I)mtext(!i) array if successful or a negative +GEMDOS error code. The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pmsgrcv]) ~ Pmsgctl ~ Pmsgget ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings for Pmsgrcv +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgrcv ( int32_t msqid, void *msgp, int32_t msgsz, + int32_t msgtyp, int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 18 +move.l msgtyp,-(sp) ; Offset 14 +move.l msgsz,-(sp) ; Offset 10 +pea msgp ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #379,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 22(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pmsgrcv +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Receive From Message Queue(!ldouble) - Read a message from a message queue. + +!item [Gemdosnummer:] +379 + +!item [Deklaration:] +int32_t Pmsgrcv ( int32_t msqid, void *msgp, int32_t msgsz, + int32_t msgtyp, int32_t msgflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pmsgrcv removes a message from the +message queue identified by (!I)msqid(!i) and stores it into the structure +pointed to by (!I)pmsg(!i). The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [msgp] +Pointer to a msgbuf structure +!item [msgsz] +(!nolink [Size]) of message data to read +!item [msgtyp] +(!nolink [Message]) type +!item [msgflg] +Flags: +!begin_xlist [IPC_NOWAIT (0x0800)] !compressed +!item [IPC_NOWAIT (0x0800)] +(!nolink [Return]) immediately if there is no message in the message queue +!item [(!nolink [MSG_EXCEPT])] +If (!I)msgtyp(!i) is greater than 0, then read the first message with message +type that differs from (!I)msgtyp(!i) +!item [(!nolink [MSG_NOERROR])] +Truncate the message text if longer than (!I)msgsz(!i) bytes +!end_xlist +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Number of bytes copied into the (!I)mtext(!i) array if successful or a negative +GEMDOS error code. The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pmsgrcv]) ~ Pmsgctl ~ Pmsgget ~ Pmsgsnd +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pmsgrcv +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgrcv ( int32_t msqid, void *msgp, int32_t msgsz, + int32_t msgtyp, int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 18 +move.l msgtyp,-(sp) ; Offset 14 +move.l msgsz,-(sp) ; Offset 10 +pea msgp ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #379,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 22(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pmsgsnd.ui b/gemdos/sysv/pmsgsnd.ui new file mode 100644 index 000000000..b8524182a --- /dev/null +++ b/gemdos/sysv/pmsgsnd.ui @@ -0,0 +1,148 @@ +!iflang [english] + +!begin_node Pmsgsnd +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Send to message queue(!ldouble) - Write a message to a message queue. + +!item [Opcode:] +378 + +!item [Syntax:] +int32_t Pmsgsnd ( int32_t msqid, const void *msgp, int32_t msgsz, + int32_t msgflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pmsgsnd sends a message (!I)msgp(!i) to the +message queue identified by (!I)msqid(!i). The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [msgp] +Pointer to a msgbuf structure +!item [msgsz] +(!nolink [Size]) of message data +!item [msgflg] +If there is no space available in the message queue and (!I)msgflg(!i) is set +to IPC_NOWAIT (0x0800), the function returns an error code, otherwise the +process is blocked until the message can be sent +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +E_OK if successful or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pmsgsnd]) ~ Pmsgctl ~ Pmsgget ~ Pmsgrcv +(!ende_liste) + + +!begin_node Bindings for Pmsgsnd +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgsnd ( int32_t msqid, const void *msgp, int32_t msgsz, + int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 14 +move.l msgsz,-(sp) ; Offset 10 +pea msgp ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #378,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 18(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pmsgsnd +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Send To (!nolink [Message]) Queue(!ldouble) - Write a message to a message queue. + +!item [Gemdosnummer:] +378 + +!item [Deklaration:] +int32_t Pmsgsnd ( int32_t msqid, const void *msgp, int32_t msgsz, + int32_t msgflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pmsgsnd sends a message (!I)msgp(!i) to the +message queue identified by (!I)msqid(!i). The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [msqid] +(!nolink [Message]) queue identifier +!item [msgp] +Pointer to a msgbuf structure +!item [msgsz] +(!nolink [Size]) of message data +!item [msgflg] +If there is no space available in the message queue and (!I)msgflg(!i) is set +to IPC_NOWAIT (0x0800), the function returns an error code, otherwise the +process is blocked until the message can be sent +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and POSIX is +available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +E_OK if successful or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pmsgsnd]) ~ Pmsgctl ~ Pmsgget ~ Pmsgrcv +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pmsgsnd +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pmsgsnd ( int32_t msqid, const void *msgp, int32_t msgsz, + int32_t msgflg ); + +!item [Assembler:] +!begin_verbatim +move.l msgflg,-(sp) ; Offset 14 +move.l msgsz,-(sp) ; Offset 10 +pea msgp ; Offset 6 +move.l msqid,-(sp) ; Offset 2 +move.w #378,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 18(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/psemconf.ui b/gemdos/sysv/psemconf.ui new file mode 100644 index 000000000..2d2f35eba --- /dev/null +++ b/gemdos/sysv/psemconf.ui @@ -0,0 +1,136 @@ +!iflang [english] + +!begin_node Psemconfig +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Semaphore facility configuration(!ldouble) - Lock or unlock the +global kernel semaphore. + +!item [Opcode:] +375 + +!item [Syntax:] +int32_t Psemconfig ( int32_t flag ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Psemconfig allows the calling process to lock or +unlock the entire semaphore facility. The following apply: +!begin_xlist [Parameter] !compressed +!item [Parameter] +Meaning +!item [~] +~ +!item [flag] +!begin_xlist [SEM_CONFIG_FREEZE (0)] !compressed +!item [SEM_CONFIG_FREEZE (0)] +Freeze the semaphore facility +!item [SEM_CONFIG_THAW (1)] +Thaw the semaphore facility +!end_xlist +!end_xlist + +(!B)Warning:(!b) Because this operation can block all processes on the system, +this function does not exist anymore on BSD systems (see CVE-2000-0461). + +!item [(!nolink [Return]) value:] +Returns E_OK on success or EINVAL if (!I)flag(!i) is not valid. The function +currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented and MUST not +be implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Psemconfig]) ~ Psemctl ~ Psemget ~ Psemop +(!ende_liste) + + +!begin_node Bindings for Psemconfig +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemconfig ( int32_t flag ); + +!item [Assembler:] +!begin_verbatim +move.l flag,-(sp) ; Offset 2 +move.w #375,-(sp) ; Offset 0 +trap #1 ; GEMDOS +addq.l #6,sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Psemconfig +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Semaphore Facility Configuration(!ldouble) - Lock or unlock the +global kernel semaphore. + +!item [Gemdosnummer:] +375 + +!item [Deklaration:] +int32_t Psemconfig ( int32_t flag ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Psemconfig allows the calling process to lock or +unlock the entire semaphore facility. The following apply: +!begin_xlist [Parameter] !compressed +!item [Parameter] +Meaning +!item [~] +~ +!item [flag] +!begin_xlist [SEM_CONFIG_FREEZE (0)] !compressed +!item [SEM_CONFIG_FREEZE (0)] +Freeze the semaphore facility +!item [SEM_CONFIG_THAW (1)] +Thaw the semaphore facility +!end_xlist +!end_xlist + +(!B)Warning:(!b) Because this operation can block all processes on the system, +this function does not exist anymore on BSD systems (see CVE-2000-0461). + +!item [Ergebnis:] +Returns E_OK on success or EINVAL if (!I)flag(!i) is not valid. The function +currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented and MUST not +be implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Psemconfig]) ~ Psemctl ~ Psemget ~ Psemop +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Psemconfig +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemconfig ( int32_t flag ); + +!item [Assembler:] +!begin_verbatim +move.l flag,-(sp) ; Offset 6 +move.w #375,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +addq.l #6,sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/psemctl.ui b/gemdos/sysv/psemctl.ui new file mode 100644 index 000000000..874528271 --- /dev/null +++ b/gemdos/sysv/psemctl.ui @@ -0,0 +1,215 @@ +!iflang [english] + +!begin_node Psemctl +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Semaphore set control operations(!ldouble) - Perform a control +operation on a semaphore set. + +!item [Opcode:] +373 + +!item [Syntax:] +int32_t Psemctl ( int32_t semid, int32_t semnum, int32_t cmd, + (!nolink [union]) semun *arg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Psemctl perfoms a control operation (!I)cmd(!i) +on a System V semaphore set (!I)semid(!i) or on the (!I)semnum(!i)-th semaphore +of that set. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [semid] +(!nolink [Semaphore]) set identifier +!item [semnum] +(!nolink [Semaphore]) number (semaphores in a set are numbered starting at 0) +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the semaphore set +identified by (!I)semid(!i) into the structure pointed to by (!I)arg.buf(!i). +(!I)semnum(!i) is ignored +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)arg.buf(!i) to the structure +associated with the semaphore set identified by (!I)semid(!i). (!I)semnum(!i) +is ignored +!item [IPC_RMID (0)] +Immediately remove the semaphore set identified by (!I)semid(!i). +(!I)semnum(!i) and (!I)arg(!i) are ignored +!item [GETNCNT (3)] +Return the value of semncnt for the (!I)semnum(!i)-th semaphore of the set +!item [GETPID (4)] +Return the value of sempid for the (!I)semnum(!i)-th semaphore of the set +!item [GETVAL (5)] +Return the value of semval for the (!I)semnum(!i)-th semaphore of the set +!item [GETALL (6)] +Return semval (current value) for all semaphores into (!I)arg.array(!i) +!item [GETZCNT (7)] +Return the value of semzcnt for the (!I)semnum(!i)-th semaphore of the set +!item [SETVAL (8)] +Set the value of semval for the (!I)semnum(!i)-th semaphore of the set to +(!I)arg.val(!i) +!item [SETALL (9)] +Set the values of semval for all semaphores of the set using (!I)arg.array(!i) +!end_xlist +!item [arg] +Pointer to a semun (!nolink [union]) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +The return value depends on (!I)cmd(!i). GETNCNT, GETPID, GETVAL and GETZCNT +return a nonnegative value on success, or a negative GEMDOS error code +otherwise. All other operations return E_OK on success, or a negative GEMDOS +error code. The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Psemctl]) ~ Psemconfig ~ Psemget ~ +Psemop +(!ende_liste) + + +!begin_node Bindings for Psemctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemctl ( int32_t semid, int32_t semnum, int32_t cmd, + (!nolink [union]) semun *arg ); + +!item [Assembler:] +!begin_verbatim +pea arg ; Offset 14 +move.l cmd,-(sp) ; Offset 10 +move.l semnum,-(sp) ; Offset 6 +move.l semid,-(sp) ; Offset 2 +move.w #373,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 18(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Psemctl +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Semaphore Set Control Operations(!ldouble) - Perform a control +operation on a semaphore set. + +!item [Gemdosnummer:] +373 + +!item [Deklaration:] +int32_t Psemctl ( int32_t semid, int32_t semnum, int32_t cmd, + (!nolink [union]) semun *arg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Psemctl perfoms a control operation (!I)cmd(!i) +on a System V semaphore set (!I)semid(!i) or on the (!I)semnum(!i)-th semaphore +of that set. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [semid] +(!nolink [Semaphore]) set identifier +!item [semnum] +(!nolink [Semaphore]) number (semaphores in a set are numbered starting at 0) +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the semaphore set +identified by (!I)semid(!i) into the structure pointed to by (!I)arg.buf(!i). +(!I)semnum(!i) is ignored +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)arg.buf(!i) to the structure +associated with the semaphore set identified by (!I)semid(!i). (!I)semnum(!i) +is ignored +!item [IPC_RMID (0)] +Immediately remove the semaphore set identified by (!I)semid(!i). +(!I)semnum(!i) and (!I)arg(!i) are ignored +!item [GETNCNT (3)] +(!nolink [Return]) the value of semncnt for the (!I)semnum(!i)-th semaphore +of the set +!item [GETPID (4)] +(!nolink [Return]) the value of sempid for the (!I)semnum(!i)-th semaphore +of the set +!item [GETVAL (5)] +(!nolink [Return]) the value of semval for the (!I)semnum(!i)-th semaphore +of the set +!item [GETALL (6)] +(!nolink [Return]) semval (current value) for all semaphores into +(!I)arg.array(!i) +!item [GETZCNT (7)] +(!nolink [Return]) the value of semzcnt for the (!I)semnum(!i)-th semaphore +of the set +!item [SETVAL (8)] +Set the value of semval for the (!I)semnum(!i)-th semaphore of the set to +(!I)arg.val(!i) +!item [SETALL (9)] +Set the values of semval for all semaphores of the set using (!I)arg.array(!i) +!end_xlist +!item [arg] +Pointer to a semun (!nolink [union]) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +The return value depends on (!I)cmd(!i). GETNCNT, GETPID, GETVAL and GETZCNT +return a nonnegative value on success, or a negative GEMDOS error code +otherwise. All other operations return E_OK on success, or a negative GEMDOS +error code. The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Psemctl]) ~ Psemconfig ~ Psemget ~ +Psemop +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Psemctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemctl ( int32_t semid, int32_t semnum, int32_t cmd, + (!nolink [union]) semun *arg ); + +!item [Assembler:] +!begin_verbatim +pea arg ; Offset 14 +move.l cmd,-(sp) ; Offset 10 +move.l semnum,-(sp) ; Offset 6 +move.l semid,-(sp) ; Offset 2 +move.w #373,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 18(p),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/psemget.ui b/gemdos/sysv/psemget.ui new file mode 100644 index 000000000..d1885af21 --- /dev/null +++ b/gemdos/sysv/psemget.ui @@ -0,0 +1,144 @@ +!iflang [english] + +!begin_node Psemget +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Get semaphore set(!ldouble) - Get a semaphore set identifier. + +!item [Opcode:] +372 + +!item [Syntax:] +int32_t Psemget ( int32_t key, int32_t nsems, int32_t semflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Psemget returns a semaphore set identifier from +an existing sempahore set, or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Allows to specify an existing semaphore set, or allows to create a new one. +A new set of (!I)nsems(!i) semaphores is created if (!I)key(!i) is +IPC_PRIVATE (0), or if (!I)key(!i) is not IPC_PRIVATE, semaphore set (!I)key(!i) +does not exist and IPC_CREAT is specified in (!I)semflg(!i). +!item [semflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)semgflg(!i) and a semaphore set (!I)key(!i) already exists, the function +returns EEXIST. +The least significant 9 bits specify the permissions (see Fchmod). +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns a nonnegative semaphore set identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Psemget]) ~ Psemconfig ~ Psemctl ~ +Psemop +(!ende_liste) + + +!begin_node Bindings for Psemget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemget ( int32_t key, int32_t nsems, int32_t semflg ); + +!item [Assembler:] +!begin_verbatim +move.l semflg,-(sp) ; Offset 10 +move.l nsems,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #372,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Psemget +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Get (!nolink [Semaphore]) Set(!ldouble) - Get a semaphore set identifier. + +!item [Gemdosnummer:] +372 + +!item [Deklaration:] +int32_t Psemget ( int32_t key, int32_t nsems, int32_t semflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Psemget returns a semaphore set identifier from +an existing sempahore set, or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Allows to specify an existing semaphore set, or allows to create a new one. +A new set of (!I)nsems(!i) semaphores is created if (!I)key(!i) is +IPC_PRIVATE (0), or if (!I)key(!i) is not IPC_PRIVATE, semaphore set (!I)key(!i) +does not exist and IPC_CREAT is specified in (!I)semflg(!i). +!item [semflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)semgflg(!i) and a semaphore set (!I)key(!i) already exists, the function +returns EEXIST. +The least significant 9 bits specify the permissions (see Fchmod). +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns a nonnegative semaphore set identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Psemget]) ~ Psemconfig ~ Psemctl ~ +Psemop +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Psemget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemget ( int32_t key, int32_t nsems, int32_t semgflg ); + +!item [Assembler:] +!begin_verbatim +move.l semflg,-(sp) ; Offset 10 +move.l nsems,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #372,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +addq.l #14,sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/psemop.ui b/gemdos/sysv/psemop.ui new file mode 100644 index 000000000..9237cabcb --- /dev/null +++ b/gemdos/sysv/psemop.ui @@ -0,0 +1,139 @@ +!iflang [english] + +!begin_node Psemop +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Semaphore set operations(!ldouble) - Perform a operation on +semaphores. + +!item [Opcode:] +374 + +!item [Syntax:] +int32_t Psemop ( int32_t semid, struct sembuf *sops, int32_t nsops ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Psemop perfoms operations on the selected +semaphores of a System V semaphore set. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [semid] +(!nolink [Semaphore]) set identifier +!item [sops] +Pointer to an array of (!I)nsops(!i) elements. Each sembuf structure defines an +operation to be performed on a single semaphore +!item [nsops] +(!nolink [Size]) of the array pointed to by (!I)sops(!i) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns E_OK on success, or a negative GEMDOS error code otherwise. The function +currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Psemop]) ~ Psemconfig ~ Psemctl ~ Psemget +(!ende_liste) + + +!begin_node Bindings for Psemop +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemop ( int32_t semid, struct sembuf *sops, int32_t nsops ); + +!item [Assembler:] +!begin_verbatim +move.l nsops,-(sp) ; Offset 10 +pea sops ; Offset 6 +move.l semid,-(sp) ; Offset 2 +move.w #374,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Psemop +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Semaphore Set Operations(!ldouble) - Perform a operation on +semaphores. + +!item [Gemdosnummer:] +374 + +!item [Deklaration:] +int32_t Psemop ( int32_t semid, struct sembuf *sops, int32_t nsops ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Psemop perfoms operations on the selected +semaphores of a System V semaphore set. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [semid] +(!nolink [Semaphore]) set identifier +!item [sops] +Pointer to an array of (!I)nsops(!i) elements. Each sembuf structure defines an +operation to be performed on a single semaphore +!item [nsops] +(!nolink [Size]) of the array pointed to by (!I)sops(!i) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns E_OK on success, or a negative GEMDOS error code otherwise. The function +currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Psemop]) ~ Psemconfig ~ Psemctl ~ +Psemget +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Psemop +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Psemop ( int32_t semid, struct sembuf *sops, int32_t nsops ); + +!item [Assembler:] +!begin_verbatim +move.l nsops,-(sp) ; Offset 10 +pea sops ; Offset 6 +move.l semid,-(sp) ; Offset 2 +move.w #374,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 14(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pshmat.ui b/gemdos/sysv/pshmat.ui new file mode 100644 index 000000000..4ae7d9aa1 --- /dev/null +++ b/gemdos/sysv/pshmat.ui @@ -0,0 +1,144 @@ +!iflang [english] + +!begin_node Pshmat +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Attach shared memory segment(!ldouble) - (!nolink [Attach]) a shared +memory segment + +!item [Opcode:] +370 + +!item [Syntax:] +int32_t Pshmat ( int32_t shmid, const void *shmaddr, int32_t shmflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pshmat attaches a shared memory segment to the +address space of the calling process. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [shmid] +(!nolink [Shared memory]) segment identifier +!item [shmaddr] +Address at which the attach occurs. If NULL, the system choose a suitable +unused page-aligned address. If (!I)shmaddr(!i) is not NULL and SHM_RND +(0x2000) is specified in (!I)shmflg(!i), the attach occurs at (!I)shmaddr(!i) +rounded down to the nearest multiple of SHMLBA. +!item [msgflg] +SHM_RDONLY (0x1000) attaches the segment for read-only access. By default, +the segment is attached for read-write access +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns the address of the attached shared memory segment, or a negative GEMDOS +error code. The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pshmat]) ~ Pshmctl ~ Pshmdt ~ Pshmget +(!ende_liste) + + +!begin_node Bindings for Pshmat +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmat ( int32_t shmid, const void *shmaddr, int32_t shmflg ); + +!item [Assembler:] +!begin_verbatim +move.l shmflg,-(sp) ; Offset 10 +pea shmaddr ; Offset 6 +move.l shmid,-(sp) ; Offset 2 +move.w #370,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pshmat +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Attach Shared Memory Segment(!ldouble) - (!nolink [Attach]) a shared +memory segment + +!item [Gemdosnummer:] +370 + +!item [Deklaration:] +int32_t Pshmat ( int32_t shmid, const void *shmaddr, int32_t shmflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pshmat attaches a shared memory segment to the +address space of the calling process. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [shmid] +(!nolink [Shared memory]) segment identifier +!item [shmaddr] +Address at which the attach occurs. If NULL, the system choose a suitable +unused page-aligned address. If (!I)shmaddr(!i) is not NULL and SHM_RND +(0x2000) is specified in (!I)shmflg(!i), the attach occurs at (!I)shmaddr(!i) +rounded down to the nearest multiple of SHMLBA. +!item [msgflg] +SHM_RDONLY (0x1000) attaches the segment for read-only access. By default, +the segment is attached for read-write access +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns the address of the attached shared memory segment, or a negative GEMDOS +error code. The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pshmat]) ~ Pshmctl ~ Pshmdt ~ Pshmget +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pshmat +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmat ( int32_t shmid, const void *shmaddr, int32_t shmflg ); + +!item [Assembler:] +!begin_verbatim +move.l shmflg,-(sp) ; Offset 6 +pea shmaddr ; Offset 2 +move.l shmid,-(sp) ; Offset 6 +move.w #370,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 14(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pshmctl.ui b/gemdos/sysv/pshmctl.ui new file mode 100644 index 000000000..275074365 --- /dev/null +++ b/gemdos/sysv/pshmctl.ui @@ -0,0 +1,160 @@ +!iflang [english] + +!begin_node Pshmctl +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Shared memory control operations(!ldouble) - Perform a control +operation on a shared memory segment. + +!item [Opcode:] +369 + +!item [Syntax:] +int32_t Pshmctl ( int32_t shmid, int32_t cmd, struct shmid_ds *buf ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pshmctl perfoms a control operation on a System V +shared memory segment. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [shmid] +(!nolink [Shared memory]) segment identifier +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the shared memory segment +identified by (!I)shmid(!i) into the structure pointed to by (!I)buf(!i) +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)buf(!i) to the structure +associated with the shared memory segment identified by (!I)shmid(!i) +!item [IPC_RMID (0)] +Mark the segment identified by (!I)msqid(!i) to be destroyed. It will be +destroyed only after the last process detaches it. (!I)buf(!i) is +ignored +!end_xlist +!item [buf] +Pointer to a shmid_ds structure +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns E_OK on success, or a negative GEMDOS error code. The function +currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pshmctl]) ~ Pshmat ~ Pshmdt ~ Pshmget +(!ende_liste) + + +!begin_node Bindings for Pshmctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmctl ( int32_t shmid, int32_t cmd, struct shmid_ds *buf ); + +!item [Assembler:] +!begin_verbatim +pea buf ; Offset 10 +move.l cmd,-(sp) ; Offset 6 +move.l shmid,-(sp) ; Offset 2 +move.w #369,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pshmctl +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Shared Memory Control Operations(!ldouble) - Perform a control +operation on a shared memory segment. + +!item [Gemdosnummer:] +369 + +!item [Deklaration:] +int32_t Pshmctl ( int32_t shmid, int32_t cmd, struct shmid_ds *buf ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pshmctl perfoms a control operation on a System V +shared memory segment. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [shmid] +(!nolink [Shared memory]) segment identifier +!item [cmd] +Command to perform: +!begin_xlist !compressed [IPC_STAT (2)] +!item [(!nolink [IPC_STAT]) (2)] +Copy data from the structure associated with the shared memory segment +identified by (!I)shmid(!i) into the structure pointed to by (!I)buf(!i) +!item [IPC_SET (1)] +Copy data from the structure pointed to by (!I)buf(!i) to the structure +associated with the shared memory segment identified by (!I)shmid(!i) +!item [IPC_RMID (0)] +Mark the segment identified by (!I)msqid(!i) to be destroyed. It will be +destroyed only after the last process detaches it. (!I)buf(!i) is +ignored +!end_xlist +!item [buf] +Pointer to a shmid_ds structure +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns E_OK on success, or a negative GEMDOS error code. The function +currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pshmctl]) ~ Pshmat ~ Pshmdt ~ Pshmget +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pshmctl +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmctl ( int32_t shmid, int32_t cmd, struct shmid_ds *buf ); + +!item [Assembler:] +!begin_verbatim +pea buf ; Offset 10 +move.w cmd,-(sp) ; Offset 6 +move.w shmid,-(sp) ; Offset 2 +move.w #369,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 14(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pshmdt.ui b/gemdos/sysv/pshmdt.ui new file mode 100644 index 000000000..f6ccce3ae --- /dev/null +++ b/gemdos/sysv/pshmdt.ui @@ -0,0 +1,110 @@ +!iflang [english] + +!begin_node Pshmdt +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Detach shared memory segment(!ldouble) - Detach a shared +memory segment + +!item [Opcode:] +371 + +!item [Syntax:] +int32_t Pshmdt ( const void *shmaddr ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pshmdt detaches the shared memory segment located +at the address specified by (!I)shmaddr(!i) from the address space of the +calling process. + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns E_OK on success, or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pshmdt]) ~ Pshmat ~ Pshmctl ~ Pshmget +(!ende_liste) + + +!begin_node Bindings for Pshmdt +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmdt ( const void *shmaddr ); + +!item [Assembler:] +!begin_verbatim +pea shmaddr ; Offset 2 +move.w #371,-(sp) ; Offset 0 +trap #1 ; GEMDOS +addq.l #6,sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pshmdt +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Detach Shared Memory Segment(!ldouble) - Detach a shared +memory segment + +!item [Gemdosnummer:] +371 + +!item [Deklaration:] +int32_t Pshmdt ( const void *shmaddr ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pshmdt detaches the shared memory segment located +at the address specified by (!I)shmaddr(!i) from the address space of the +calling process. + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns E_OK on success, or a negative GEMDOS error code. The function currently +returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pshmdt]) ~ Pshmat ~ Pshmctl~ Pshmget +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pshmdt +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmdt ( const void *shmaddr ); + +!item [Assembler:] +!begin_verbatim +pea shmaddr ; Offset 2 +move.w #371,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +addq.l #6,sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/pshmget.ui b/gemdos/sysv/pshmget.ui new file mode 100644 index 000000000..fb5e08fdb --- /dev/null +++ b/gemdos/sysv/pshmget.ui @@ -0,0 +1,156 @@ +!iflang [english] + +!begin_node Pshmget +(!begin_liste) [Availability] +!item [Name:] +(!rdouble)Get shared memory segment(!ldouble) - Allocate a shared +memory segment. + +!item [Opcode:] +368 + +!item [Syntax:] +int32_t Pshmget ( int32_t key, int32_t size, int32_t shmflg ); + +!item [Description:] +The (!nolink [GEMDOS]) routine Pshmget returns an identifier of an existing +shared memory segment or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Obtain the identifer of an existing segment when (!I)shmflg(!i) is zero and +(!I)key(!i) is not IPC_PRIVATE (0). +A new shared memory segment is created if (!I)key(!i) is IPC_PRIVATE, or +(!I)key(!i) is not IPC_PRIVATE, no segment (!I)key(!i) exists and IPC_CREAT +is specified in (!I)shmflg(!i). +!item [size] +If (!I)key(!i) is IPC_PRIVATE, or if (!I)key(!i) is not IPC_PRIVATE, no segment +(!I)key(!i) exists and IPC_CREAT is specified in (!I)shmflg(!i), +(!I)size(!i) specifies the requested size for the segment (this value will be +rounded up to a multiple of PAGE_SIZE). +!item [msgflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)shmflg(!i) and a segment (!I)key(!i) already exists, the function +returns EEXIST. The least significant 9 bits specify the permissions +(see Fchmod) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [(!nolink [Return]) value:] +Returns a shared memory segment identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Availability:] This function is currently not implemented. + +!item [Group:] +System V IPC + +!item [See also:] +(!link [Binding] [Bindings for Pshmget]) ~ Pshmat ~ Pshmctl ~ Pshmdt +(!ende_liste) + + +!begin_node Bindings for Pshmget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmget ( int32_t key, int32_t size, int32_t shmflg ); + +!item [Assembler:] +!begin_verbatim +move.l shmflg,-(sp) ; Offset 10 +move.l size,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #368,-(sp) ; Offset 0 +trap #1 ; GEMDOS +lea 14(sp),sp ; Correct stack +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!else + +!begin_node Pshmget +(!begin_liste) [Beschreibung] +!item [Name:] +(!rdouble)Get Shared Memory Segment(!ldouble) - Allocate a shared +memory segment. + +!item [Gemdosnummer:] +368 + +!item [Deklaration:] +int32_t Pshmget ( int32_t key, int32_t size, int32_t shmflg ); + +!item [Beschreibung:] +The (!nolink [GEMDOS]) routine Pshmget returns an identifier of an existing +shared memory segment or creates a new one. The following apply: +!begin_xlist !compressed [Parameter] +!item [Parameter] +Meaning +!item [~] +~ +!item [key] +Obtain the identifer of an existing segment when (!I)shmflg(!i) is zero and +(!I)key(!i) is not IPC_PRIVATE (0). +A new shared memory segment is created if (!I)key(!i) is IPC_PRIVATE, or +(!I)key(!i) is not IPC_PRIVATE, no segment (!I)key(!i) exists and IPC_CREAT +is specified in (!I)shmflg(!i). +!item [size] +If (!I)key(!i) is IPC_PRIVATE, or if (!I)key(!i) is not IPC_PRIVATE, no segment +(!I)key(!i) exists and IPC_CREAT is specified in (!I)shmflg(!i), +(!I)size(!i) specifies the requested size for the segment (this value will be +rounded up to a multiple of PAGE_SIZE). +!item [msgflg] +If both IPC_CREAT (0x0200) and IPC_EXCL (0x0400) are specified +in (!I)shmflg(!i) and a segment (!I)key(!i) already exists, the function +returns EEXIST. The least significant 9 bits specify the permissions +(see Fchmod) +!end_xlist + +(!B)Note:(!b) The complete documentation about (!nolink [System V IPC]) and +POSIX is available from multiple sources: IEEE, The Open Group, Unix manpages. + +!item [Ergebnis:] +Returns a shared memory segment identifier or a negative GEMDOS error code. +The function currently returns ENOSYS. + +!item [Verf(!uumlaut)gbar:] +This function is currently not implemented. + +!item [Gruppe:] +System V IPC + +!item [Querverweis:] +(!link [Binding] [Bindings f(!uumlaut)r Pshmget]) ~ Pshmat ~ Pshmctl ~ Pshmdt +(!ende_liste) + + +!begin_node Bindings f(!uumlaut)r Pshmget +!ignore_index +(!begin_liste) [Assembler:] +!item [C:] +int32_t Pshmget ( int32_t key, int32_t size, int32_t shmflg ); + +!item [Assembler:] +!begin_verbatim +move.l shmflg,-(sp) ; Offset 10 +move.l size,-(sp) ; Offset 6 +move.l key,-(sp) ; Offset 2 +move.w #368,-(sp) ; Offset 0 +trap #1 ; GEMDOS aufrufen +lea 14(sp),sp ; Stack korrigieren +!end_verbatim + +(!ende_liste) +!end_node +!end_node + +!endif diff --git a/gemdos/sysv/sysv.u b/gemdos/sysv/sysv.u new file mode 100644 index 000000000..4652cace5 --- /dev/null +++ b/gemdos/sysv/sysv.u @@ -0,0 +1,68 @@ +!iflang [english] + + +!begin_node System V IPC +!html_name gemdos_sysv + +(!red) +The following functions are not yet implemented. +(!coloff) + +!begin_xlist [x Psemconfig~] !compressed +!item [(!bullet) Pmsgctl~~~~] Perform control operation on a message queue +!item [(!bullet) Pmsgget~~~~] Get message queue identifier +!item [(!bullet) Pmsgrcv~~~~] Read message from a message queue +!item [(!bullet) Pmsgsnd~~~~] (!nolink [Send]) message to a message queue +!item [(!bullet) Psemconfig~] Lock/unlock global kernel semaphore +!item [(!bullet) Psemctl~~~~] Perform control operation on a semaphore set +!item [(!bullet) Psemget~~~~] Get a semaphore set identifier +!item [(!bullet) Psemop~~~~~] Perform operations on semaphores +!item [(!bullet) Pshmat~~~~~] (!nolink [Attach]) a shared memory segment +!item [(!bullet) Pshmctl~~~~] Perform control operation on a shared memory segment +!item [(!bullet) Pshmdt~~~~~] Detach a shared memory segment +!item [(!bullet) Pshmget~~~~] Allocate a shared memory segment +!end_xlist + + +!else + + +!begin_node System V IPC +!html_name gemdos_sysv + +(!red) +The following functions are not yet implemented. +(!coloff) + +!begin_xlist [x Psemconfig~] !compressed +!item [(!bullet) Pmsgctl~~~~] Perform control operation on a message queue +!item [(!bullet) Pmsgget~~~~] Get message queue identifier +!item [(!bullet) Pmsgrcv~~~~] Read message from a message queue +!item [(!bullet) Pmsgsnd~~~~] (!nolink [Send]) message to a message queue +!item [(!bullet) Psemconfig~] Lock/unlock global kernel semaphore +!item [(!bullet) Psemctl~~~~] Perform control operation on a semaphore set +!item [(!bullet) Psemget~~~~] Get a semaphore set identifier +!item [(!bullet) Psemop~~~~~] Perform operations on semaphores +!item [(!bullet) Pshmat~~~~~] (!nolink [Attach]) a shared memory segment +!item [(!bullet) Pshmctl~~~~] Perform control operation on a shared memory segment +!item [(!bullet) Pshmdt~~~~~] Detach a shared memory segment +!item [(!bullet) Pshmget~~~~] Allocate a shared memory segment +!end_xlist + + +!endif + +!include gemdos/sysv/pmsgctl.ui +!include gemdos/sysv/pmsgget.ui +!include gemdos/sysv/pmsgrcv.ui +!include gemdos/sysv/pmsgsnd.ui +!include gemdos/sysv/psemconf.ui +!include gemdos/sysv/psemctl.ui +!include gemdos/sysv/psemget.ui +!include gemdos/sysv/psemop.ui +!include gemdos/sysv/pshmat.ui +!include gemdos/sysv/pshmctl.ui +!include gemdos/sysv/pshmdt.ui +!include gemdos/sysv/pshmget.ui + +!end_node