RTEMS: POSIX_Shm_Object_operations Struct Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Data Fields
POSIX_Shm_Object_operations Struct Reference
Internal » RTEMS POSIX API » POSIX Shared Memory Private Support

Operations on POSIX Shared Memory Objects. More...

`#include <shm.h>`

## Data Fields
int(* | object_create )(POSIX_Shm_Object *shm_obj, size_t size)
| Allocates a new shm_obj with initial size.
int(* | object_resize )(POSIX_Shm_Object *shm_obj, size_t size)
| Changes the shm_obj size to size.
int(* | object_delete )(POSIX_Shm_Object *shm_obj)
| Deletes the shm_obj.
int(* | object_read )(POSIX_Shm_Object *shm_obj, void *buf, size_t count)
| Copies up to @count bytes of the shm_obj data into buf.
void *(* | object_mmap )(POSIX_Shm_Object *shm_obj, size_t len, int prot, off_t off)
| Maps a shared memory object.

## Detailed Description

Operations on POSIX Shared Memory Objects.

## Field Documentation

## ◆ object_create

int(* POSIX_Shm_Object_operations::object_create) (POSIX_Shm_Object *shm_obj, size_t size)

Allocates a new shm_obj with initial size.

New shared memory is initialized to zeroes.

Returns 0 for success.

## ◆ object_delete

int(* POSIX_Shm_Object_operations::object_delete) (POSIX_Shm_Object *shm_obj)

Deletes the shm_obj.

Zeroes out the memory.

Returns 0 for success.

## ◆ object_mmap

void *(* POSIX_Shm_Object_operations::object_mmap) (POSIX_Shm_Object *shm_obj, size_t len, int prot, off_t off)

Maps a shared memory object.

Establishes a memory mapping between the shared memory object and the caller.

Returns the mapped address of the object.

## ◆ object_read

int(* POSIX_Shm_Object_operations::object_read) (POSIX_Shm_Object *shm_obj, void *buf, size_t count)

Copies up to @count bytes of the shm_obj data into buf.

Returns the number of bytes read (copied) into buf.

## ◆ object_resize

int(* POSIX_Shm_Object_operations::object_resize) (POSIX_Shm_Object *shm_obj, size_t size)

Changes the shm_obj size to size.

Zeroes out the portion of the shared memory object that shrinks or grows.

Returns 0 for success.

The documentation for this struct was generated from the following file:

- cpukit/include/rtems/posix/shm.h