SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause brief: | Tries to get a buffer from the partition. copyrights: - Copyright (C) 2020 embedded brains GmbH & Co. KG - Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) definition: default: attributes: null body: null params: - ${../../type/if/id:/name} ${.:/params[0]/name} - void **${.:/params[1]/name} return: ${../../status/if/code:/name} variants: [] description: | This directive allows a buffer to be obtained from the partition specified by ${.:/params[0]/name}. The address of the allocated buffer is returned through the ${.:/params[1]/name} parameter. enabled-by: true index-entries: - get buffer from partition - obtain buffer from partition interface-type: function links: - role: interface-placement uid: header - role: interface-ingroup uid: group - role: constraint uid: /constraint/directive-ctx-isr-local - role: constraint uid: /constraint/directive-ctx-task - role: constraint uid: /constraint/directive-no-preempt-local - role: constraint uid: /constraint/directive-remote name: rtems_partition_get_buffer notes: | The buffer start alignment is determined by the memory area and buffer size used to create the partition. A task cannot wait on a buffer to become available. Getting a buffer from a global partition which does not reside on the local node will generate a request telling the remote node to allocate a buffer from the partition. params: - description: is the partition identifier. dir: null name: id - description: | is the pointer to a ``void`` pointer object. When the directive call is successful, the pointer to the allocated buffer will be stored in this object. dir: out name: buffer return: return: null return-values: - description: | The requested operation was successful. value: ${../../status/if/successful:/name} - description: | There was no partition associated with the identifier specified by ${.:/params[0]/name}. value: ${../../status/if/invalid-id:/name} - description: | The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. value: ${../../status/if/invalid-address:/name} - description: | There was no free buffer available to allocate and return. value: ${../../status/if/unsatisfied:/name} type: interface