HP 3000 Manuals

shmdt [ MPE/iX Developer's Kit Reference Manual Volume II ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume II

shmdt 

Detaches a process from a shared memory area.

Syntax 

     #include <sys/types.h>
     #include <sys/ipc.h>
     #include <sys/shm.h>

     int shmdt (char *shmaddr);

Parameters 

shmaddr    Passes the address of the shared memory area (returned from a
           call to shmat()).

Return Values 

0          Success.

-1         An error occurred, and errno is set to indicate the error
           condition.

Description 

The shmdt() function detaches a shared memory area from the calling
process's data area.  The address of the shared memory area is specified
by shmaddr (returned from a call to shmat()).

Implementation Considerations 

None.

Errors 

If an error occurs, errno is set to one of the following values.

EINVAL            CAUSE           shmaddr is not the data area start address of a
                                  shared memory area.

                  ACTION          Check to see that shmaddr is equal to the value
                                  returned by a previous shmat() call.

ESYSERR           CAUSE           An operating system error occurred that does not map
                                  directly to any of the above errors.

                  ACTION          Examine the MPE/iX process error stack for the type
                                  of system error.

See Also 

shmat(), shmctl(), shmget(), SVID2 (Section 12)



MPE/iX 5.0 Documentation