Skip to content

Add info about unimplemented System V IPC functions #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gemdos/gemdos.u
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
55 changes: 55 additions & 0 deletions gemdos/structures/ipc_perm.ui
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions gemdos/structures/msgbuf.ui
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions gemdos/structures/msqid_ds.ui
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions gemdos/structures/sem.ui
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions gemdos/structures/sembuf.ui
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions gemdos/structures/semid_ds.ui
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions gemdos/structures/seminfo.ui
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions gemdos/structures/semun.ui
Original file line number Diff line number Diff line change
@@ -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
Loading