gml_SharedMemorySegment.h

Go to the documentation of this file.
00001 /** 
00002  *  @file gml_SharedMemorySegment.h
00003  *
00004  *    Cross-platform C shared memory regions.
00005  *
00006  *  Copyright (c) 2004 CLIPS-IMAG
00007  *
00008  *  See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00009  *  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  *
00011  *  Created on December 12, 2004 (JL).
00012  */
00013 
00014 #ifndef __GML_SHARED_MEMORY__
00015 #define __GML_SHARED_MEMORY__
00016 
00017 #include "gml/base/gml_Errors.h"
00018 #include "gml/base/gml_Types.h"
00019 
00020 /**
00021  * gml_SharedMemorySegment_Attach --
00022  *
00023  *   Map a named shared memory segment into process memory, possibly creating
00024  *   it in the process.
00025  *
00026  *   If the calling thread terminates without calling 
00027  *   gml_SharedMemorySegment_Detach, the segment will be unmapped 
00028  *   automatically.
00029  */
00030 GML_EXTERN_C
00031 gml_TError gml_SharedMemorySegment_Attach
00032 (
00033   void **handle,  /**< on return, pointer to the first byte of the shared segment */
00034   UInt32 *size,   /**< size of the segment to map                                 */
00035   UInt32 *name    /**< segment name (system-wide namespace)                       */
00036 );
00037 
00038 
00039 /**
00040  * gml_SharedMemorySegment_Detach --
00041  *
00042  *   Unmap the segment mapped at <handle> from memory.
00043  *   If the segment was created by this process, also remove it from the segment
00044  *   namespace.
00045  */
00046 GML_EXTERN_C
00047 gml_TError gml_SharedMemorySegment_Detach (void *handle);
00048 
00049 
00050 #endif /* __GML_SHARED_MEMORY__ */
00051 
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.