Loading...
Searching...
No Matches
Signals
Shared Memory Library
Collaboration diagram for Signals:

## Topics

| Producer
| Consumer

## Functions

long | l4shmc_add_signal (l4shmc_area_t *shmarea, char const *signal_name, l4shmc_signal_t *signal)
| Add a signal for the shared memory area.
long | l4shmc_attach_signal (l4shmc_area_t *shmarea, char const *signal_name, l4_cap_idx_t thread, l4shmc_signal_t *signal)
| Attach to signal.
long | l4shmc_get_signal (l4shmc_area_t *shmarea, char const *signal_name, l4shmc_signal_t *signal)
| Get signal object from the shared memory area.
l4_cap_idx_t | l4shmc_signal_cap (l4shmc_signal_t const *signal)
| Get the signal capability of a signal.
long | l4shmc_check_magic (l4shmc_chunk_t const *chunk)
| Check magic value of a chunk.

## Detailed Description

## Function Documentation

## l4shmc_add_signal()

long l4shmc_add_signal | ( | l4shmc_area_t * | shmarea,
|  | char const * | signal_name,
|  | l4shmc_signal_t * | signal )

Add a signal for the shared memory area.

Parameters

  | shmarea | The shared memory area.
  | signal_name | Name of the signal.
  [out] | signal | Signal structure to fill in.

Return values

  0 | Success.
  <0 | Error.

Examples
  examples/libs/shmc/prodcons.c.

References L4_CV, and L4_INLINE.

## l4shmc_attach_signal()

long l4shmc_attach_signal | ( | l4shmc_area_t * | shmarea,
|  | char const * | signal_name,
|  | l4_cap_idx_t | thread,
|  | l4shmc_signal_t * | signal )

Attach to signal.

Parameters

  | shmarea | Shared memory area.
  | signal_name | Name of the signal.
  | thread | Thread capability index to attach the signal to.
  [out] | signal | Signal data structure to fill.

Return values

  0 | Success.
  <0 | Error.

Examples
  examples/libs/shmc/prodcons.c.

References L4_CV.

## l4shmc_check_magic()

long l4shmc_check_magic | ( | l4shmc_chunk_t const * | chunk | ) |

inline

Check magic value of a chunk.

Parameters

  chunk | Chunk.

Return values

  0 | Magic value is not valid.
  >0 | Chunk is OK, the magic value is valid.

References L4_CV.

## l4shmc_get_signal()

long l4shmc_get_signal | ( | l4shmc_area_t * | shmarea,
|  | char const * | signal_name,
|  | l4shmc_signal_t * | signal )

Get signal object from the shared memory area.

Parameters

  | shmarea | Shared memory area.
  | signal_name | Name of the signal.
  [out] | signal | Signal data structure to fill.

Return values

  0 | Success.
  <0 | Error.

References L4_CV.

## l4shmc_signal_cap()

l4_cap_idx_t l4shmc_signal_cap | ( | l4shmc_signal_t const * | signal | ) |

inline

Get the signal capability of a signal.

Parameters

  signal | Signal.

Returns
  Capability of the signal object.

References L4_CV, and L4_INLINE.