Platform-Independent User Space

User-space implementation declarations for all targets.

These declarations are only available to user-space code.

int cuddli_memregion_release_by_token(struct cuddlci_token token)

Release memory region using a token.

Parameters

struct cuddlci_token token

Input parameter identifying the memory region to be released. Memory region tokens originate with a successful call to to cuddl_memregion_claim(), and can be obtained from the token member of a cuddl_memregion_info or cuddl_memregion structure.

Description

Release ownership of the memory region identified by token from user space. Typically this function is not called directly, but memory regions are instead released by calling cuddl_memregion_release() or cuddl_memregion_unmap_and_release().

Return

0 on success, or a negative error code.

Error codes:
  • -ENODEV: The token is invalid.

  • -EBADSLT: The token is invalid (Linux).

  • -ENOMEM: Error allocating memory in IOCTL call (Linux).

  • -EOVERFLOW: Error copying data to/from kernel space (Linux).

  • -ENOEXEC: User/kernel major version number mismatch (Linux).

  • Value of -errno resulting from from open() call on Cuddl manager device (Linux).

  • Value of -errno resulting from from ioctl() call on Cuddl manager device (Linux).

  • Value of -errno resulting from from close() call on Cuddl manager device (Linux).

int cuddli_eventsrc_release_by_token(struct cuddlci_token token)

Release event source using a token.

Parameters

struct cuddlci_token token

Input parameter identifying the event source to be released. Event source tokens originate with a successful call to to cuddl_eventsrc_claim(), and can be obtained from the token member of a cuddl_eventsrc_info or cuddl_eventsrc structure.

Description

Release ownership of the event source identified by token from user space. Typically this function is not called directly, but event sources are instead released by calling cuddl_eventsrc_release() or cuddl_eventsrc_close_and_release().

Return

0 on success, or a negative error code.

Error codes:
  • -ENODEV: The token is invalid.

  • -EBADSLT: The token is invalid (Linux).

  • -ENOMEM: Error allocating memory in IOCTL call (Linux).

  • -EOVERFLOW: Error copying data to/from kernel space (Linux).

  • -ENOEXEC: User/kernel major version number mismatch (Linux).

  • Value of -errno resulting from from open() call on Cuddl manager device (Linux).

  • Value of -errno resulting from from ioctl() call on Cuddl manager device (Linux).

  • Value of -errno resulting from from close() call on Cuddl manager device (Linux).