diff options
Diffstat (limited to 'cpukit/posix/include/rtems/posix/shm.h')
-rw-r--r-- | cpukit/posix/include/rtems/posix/shm.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/shm.h b/cpukit/posix/include/rtems/posix/shm.h index dfdd58ed2a..9284b398cf 100644 --- a/cpukit/posix/include/rtems/posix/shm.h +++ b/cpukit/posix/include/rtems/posix/shm.h @@ -91,6 +91,16 @@ struct POSIX_Shm_Object_operations { * Returns the number of bytes read (copied) into @a buf. */ int ( *object_read ) ( POSIX_Shm_Object *shm_obj, void *buf, size_t count ); + + /** + * @brief Maps a shared memory object. + * + * Establishes a memory mapping between the shared memory object and the + * caller. + * + * Returns the mapped address of the object. + */ + void * ( *object_mmap ) ( POSIX_Shm_Object *shm_obj, size_t len, int prot, off_t off); }; /** @@ -144,6 +154,16 @@ extern int _POSIX_Shm_Object_read_from_workspace( ); /** + * @brief object_mmap operation for shm objects stored in RTEMS Workspace. + */ +extern void * _POSIX_Shm_Object_mmap_from_workspace( + POSIX_Shm_Object *shm_obj, + size_t len, + int prot, + off_t off +); + +/** * @brief object_create operation for shm objects stored in C program heap. */ extern int _POSIX_Shm_Object_create_from_heap( @@ -173,6 +193,16 @@ extern int _POSIX_Shm_Object_read_from_heap( size_t count ); +/** + * @brief object_mmap operation for shm objects stored in C program heap. + */ +extern void * _POSIX_Shm_Object_mmap_from_heap( + POSIX_Shm_Object *shm_obj, + size_t len, + int prot, + off_t off +); + /** @} */ #ifdef __cplusplus |