dg_ipc_info(2) DG/UX 5.4 Rel. 2.01 dg_ipc_info(2)
NAME
dgipcinfo - get information about current IPCs state
SYNOPSIS
#include <sys/dgipcinfo.h>
#include <sys/msg.h>
#include <sys/sem.h>
#include <sys/shm.h>
int dgipcinfo(ipccomponent, bufferptr, keyptr, version)
int ipccomponent;
char * bufferptr;
keyt * keyptr;
long version;
where:
ipccomponent The IPC component: IPCMSQ (message queues), IPCSEM
(semaphores), or IPCSHM (shared memory).
bufferptr A pointer to a user buffer for returned information.
The buffer should be of struct msqidds, semidds or
shmidds type, depending on the value of
ipccomponent.
keyptr The value of *keyptr should be set to
DG_IPC_INFO_INITIAL_KEY on the first call for each IPC
component. On return, *keyptr contains a value to
which *keyptr should be assigned on a subsequent call
to dgipcinfo.
version The version of this call (the most recent version is
DGIPCINFOCURRENTVERSION). See dgipcinfo.h.
DESCRIPTION
This is an alternative interface to /dev/kmem. This system call
returns information about the current state of the IPC
components--shared memory, message queues, and semaphores, as
selected by ipccomponent.
The dgipcinfo call searches the ipccomponent data structures. The
first valid entry it finds is copied into the user buffer pointed to
by bufferptr. *keyptr is assigned to the value that should be used
by the next dgipcinfo call to get the next valid entry of
ipccomponent. If no valid entry is found, the dgipcinfo call
returns with errno set to an appropriate value.
RETURN VALUE
1 This value indicates a successful return of information about
an IPC structure, but more structures may still be available.
0 Successful completion. This means that there are no more IPC
structures of type ipccomponent to return. The contents of
buffer are undefined.
Licensed material--property of copyright holder(s) 1
dg_ipc_info(2) DG/UX 5.4 Rel. 2.01 dg_ipc_info(2)
-1 Error. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EINVAL Invalid argument--ipccomponent is not IPC_SHM, IPC_MSQ, or
IPC_SEM.
EINVAL Invalid argument--version is not a valid version number.
EINVAL Invalid argument--keyptr points to an invalid index key.
EFAULT bufferptr or keyptr is an invalid address.
SEE ALSO
exec(2), ulimit(2).
Licensed material--property of copyright holder(s) 2