summaryrefslogtreecommitdiffstats
path: root/spec/rtems/part/if/get-buffer.yml
blob: b1ac58d35f7c073d96f745d2fbe8a76fe631eb58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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 (http://www.embedded-brains.de)
- 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 in
  the ``${.:/params[0]/name}`` parameter.  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
name: rtems_partition_get_buffer
notes: |
  This directive will not cause the running task to be preempted.

  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 buffer pointer variable.  The pointer to the allocated
    buffer will be stored in this variable, in case of a successful operation.
  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 with the specified identifier.
    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