*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> shmdt (2)              
Title
Content
Arch
Section
 

shmdt(2)

Contents


NAME    [Toc]    [Back]

       shmdt - Detach a shared memory region

SYNOPSIS    [Toc]    [Back]

       #include <sys/shm.h>

       int shmdt(
               const void *addr );

       Application  developers  may  want  to specify an #include
       statement for <sys/types.h> and <sys/ipc.h> before the one
       for <sys/shm.h> if programs are being developed for multiple
 platforms.  The additional #include statements are not
       required on Tru64 UNIX systems or by ISO or XSH standards,
       but may be on other vendors' systems that conform to these
       standards.

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       shmdt():  XSH4.0, XSH4.2, XSH5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies the starting virtual address for the shared memory
 region to be detached. This is the address returned by
       a previous shmat() call.

DESCRIPTION    [Toc]    [Back]

       The  shmdt() function detaches the shared memory region at
       the address specified  by  the  addr  parameter  from  the
       address  space  of the calling process. Other instances of
       the region attached at other addresses are unaffected.

NOTES    [Toc]    [Back]

       The librt  library  contains  alternative  interfaces  for
       interprocess  communication.  The  names of these routines
       adhere to the format shm_* and their reference  pages  are
       listed in SEE ALSO.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  the shmdt() function decrements
 the value of shm_nattach in the data structure associated
  with  the  shared memory ID of the attached shared
       memory segment and returns 0  (zero).  Upon  failure,  the
       shared memory segment is not detached, -1 is returned, and
       errno is set to indicate the error.

ERRORS    [Toc]    [Back]

       The shmdt() function sets errno to  the  specified  values
       for  the following conditions: The addr parameter does not
       specify the starting address of a shared memory region.







SEE ALSO    [Toc]    [Back]

      
      
       Functions: shmat(2),  shmctl(2),  shmget(2),  shm_open(3),
       shm_unlink(3)

       Data structures: shmid_ds(4)

       Standards: standards(5)



                                                         shmdt(2)
[ Back ]
 Similar pages
Name OS Title
shmat FreeBSD attach or detach shared memory
shmdt FreeBSD attach or detach shared memory
shmid_ds Tru64 Defines a shared memory region
shmat Tru64 Attach a shared memory region
shmget Tru64 Return (and possibly create) the ID for a shared memory region
nshmget Tru64 Returns (or creates) the ID for a shared memory region (libnuma library)
msem_init Tru64 Initialize a semaphore in a mapped file or shared memory region
shm_open FreeBSD open or create a shared memory object shm_unlink -- remove a shared memory object
mvalid Tru64 Check memory region for validity
mlock Tru64 Locks or unlocks a specified region in memory (P1003.1b)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service