diff options
Diffstat (limited to 'man3p/shmdt.3p')
-rw-r--r-- | man3p/shmdt.3p | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/man3p/shmdt.3p b/man3p/shmdt.3p new file mode 100644 index 000000000..c2c3fa325 --- /dev/null +++ b/man3p/shmdt.3p @@ -0,0 +1,79 @@ +.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved +.TH "SHMDT" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" +.\" shmdt +.SH NAME +shmdt \- XSI shared memory detach operation +.SH SYNOPSIS +.LP +\fB#include <sys/shm.h> +.br +.sp +int shmdt(const void *\fP\fIshmaddr\fP\fB); \fP +\fB +.br +\fP +.SH DESCRIPTION +.LP +The \fIshmdt\fP() function operates on XSI shared memory (see the +Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.340, +Shared Memory Object). It is unspecified whether this function +interoperates with the realtime interprocess communication facilities +defined in \fIRealtime\fP . +.LP +The \fIshmdt\fP() function detaches the shared memory segment located +at the address specified by \fIshmaddr\fP from the +address space of the calling process. +.SH RETURN VALUE +.LP +Upon successful completion, \fIshmdt\fP() shall decrement the value +of \fIshm_nattch\fP in the data structure associated with +the shared memory ID of the attached shared memory segment and return +0. +.LP +Otherwise, the shared memory segment shall not be detached, \fIshmdt\fP() +shall return -1, and \fIerrno\fP shall be set to +indicate the error. +.SH ERRORS +.LP +The \fIshmdt\fP() function shall fail if: +.TP 7 +.B EINVAL +The value of \fIshmaddr\fP is not the data segment start address of +a shared memory segment. +.sp +.LP +\fIThe following sections are informative.\fP +.SH EXAMPLES +.LP +None. +.SH APPLICATION USAGE +.LP +The POSIX Realtime Extension defines alternative interfaces for interprocess +communication. Application developers who need to +use IPC should design their applications so that modules using the +IPC routines described in \fIXSI Interprocess Communication\fP can +be easily modified to use the alternative +interfaces. +.SH RATIONALE +.LP +None. +.SH FUTURE DIRECTIONS +.LP +None. +.SH SEE ALSO +.LP +\fIXSI Interprocess Communication\fP , \fIRealtime\fP , \fIexec\fP() +, +\fIexit\fP() , \fIfork\fP() , \fIshmat\fP() , \fIshmctl\fP() , \fIshmget\fP() +, \fIshm_open\fP() , \fIshm_unlink\fP() , the Base Definitions volume +of IEEE\ Std\ 1003.1-2001, \fI<sys/shm.h>\fP +.SH COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology +-- Portable Operating System Interface (POSIX), The Open Group Base +Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of +Electrical and Electronics Engineers, Inc and The Open Group. In the +event of any discrepancy between this version and the original IEEE and +The Open Group Standard, the original IEEE and The Open Group Standard +is the referee document. The original Standard can be obtained online at +http://www.opengroup.org/unix/online.html . |