dshm_attach(3dshm)
dshm_attach --
attach DSHM segment
Synopsis
#include <dshm.h>
dshm_handle_t
dshm_attach (int dshmid, int dshmflgs, unsigned long * max_mappings);
Description
dshm_attach attaches the designated DSHM segment
to the calling process, placing the map at the logical address assigned by
dshm_get(3dshm),
and allocating and initializing the per-attach management data.
Upon successful return, *max_mappings indicates the maximum concurrent
mappings the application can safely use (total across all attached
processes) without deadlocking.
Return values
If dshm_attach returns DSHM_NULL_HANDLE, an error occurred.
errno is set to identify the error.
Otherwise, dshm_attach returns
an opaque handle for use in subsequent operations
on the attached segment.
Errors
In the following conditions, dshm_attach fails and sets
errno to:
EBUSY-
Segment is not initialized.
Initialization (by
dshm_get(3dshm))
is still in progress or was terminated prematurely.
EINVAL-
Illegal flags in dshmflgs.
EINVAL-
Attach failed due to address space conflict.
ENOMEM-
Insufficient resources to allocate per-attach management structure(s).
EINVAL-
dshmid is not a valid dynamically mapped shared memory identifier.
EACCES-
Operation permission is denied to the calling process.
ENOMEM-
The available data space is not large enough to accommodate the shared
memory segment.
EMFILE-
The number of dynamically mapped shared memory segments attached to the
calling process would exceed the system-imposed limit.
References
dshm_alignment(3dshm),
dshm_bufindex(3dshm),
dshm_control(3dshm),
dshm_detach(3dshm),
dshm_get(3dshm),
dshm_map(3dshm),
dshm_minmapsize(3dshm),
dshm_reattach(3dshm),
dshm_unmap(3dshm),
dshm_updatetlb(3dshm)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004