dshm_unmap(3dshm)


dshm_unmap -- unmap DSHM buffer

Synopsis

   #include <dshm.h>
   

int dshm_unmap(dshm_handle_t handle, const void* bufp);

Description

dshm_unmap releases a mapping to allow map slot reassignment as needed.

If dshm_unmap returns an error the map should be considered corrupt. An error indicates a bug, usually a DSHM usage bug in the application. The caller should immediately abort all processes using the map. The map needs to be destroyed and recreated in order to restart the application.

Return values

If dshm_unmap returns 0, the operation succeeded.

If dshm_unmap returns -1, an error occurred and the map should be considered corrupt. errno is set to identify the error.

Errors

In the following conditions, dshm_unmap fails and sets errno to:

EDOMAIN
The reference count for a map slot is negative. This strongly suggests an imbalance in dshm_unmap and dshm_unmap operations.

EAGAIN
An attempt was made to unmap a buffer that is still in use by the system. For example, I/O is pending.

other
Some other internal inconsistency was discovered. For example, a system call to remap a map slot might have failed.

References

dshm_alignment(3dshm), dshm_attach(3dshm), dshm_bufindex(3dshm), dshm_control(3dshm), dshm_detach(3dshm), dshm_get(3dshm), dshm_map(3dshm), dshm_minmapsize(3dshm), dshm_reattach(3dshm), dshm_updatetlb(3dshm)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004