Lines Matching defs:slot
21 * index of the key slot containing the volatile key definition.
51 * key slots. This function returns a pointer to the key slot containing the
55 * into a key slot if not already done.
57 * On success, the returned key slot has been registered for reading.
58 * It is the responsibility of the caller to call psa_unregister_read(slot)
59 * when they have finished reading the contents of the slot.
63 * key slot containing the description of the key
67 * \p *p_slot contains a pointer to the key slot containing the
69 * The key slot counter has been incremented.
77 * due to a lack of empty key slot, or available memory.
87 /** Initialize the key slot structures.
95 * This function is not thread safe, it wipes every key slot regardless of
96 * state and reader count. It should only be called when no slot is in use.
101 /** Find a free key slot and reserve it to be filled with a key.
103 * This function finds a key slot that is free,
104 * sets its state to PSA_SLOT_FILLING and then returns the slot.
106 * On success, the key slot's state is PSA_SLOT_FILLING.
107 * It is the responsibility of the caller to change the slot's state to
111 * global key slot mutex.
114 * associated to the returned slot.
115 * \param[out] p_slot On success, a pointer to the slot.
122 * This function attempted to operate on a key slot which was in an
128 /** Change the state of a key slot.
130 * This function changes the state of the key slot from expected_state to
131 * new state. If the state of the slot was not expected_state, the state is
135 * global key slot mutex.
137 * \param[in] slot The key slot.
138 * \param[in] expected_state The current state of the slot.
139 * \param[in] new_state The new state of the slot.
142 The key slot's state variable is new_state.
144 * The slot's state was not expected_state.
147 psa_key_slot_t *slot, psa_key_slot_state_t expected_state,
150 if (slot->state != expected_state) {
153 slot->state = new_state;
157 /** Register as a reader of a key slot.
159 * This function increments the key slot registered reader counter by one.
161 * global key slot mutex.
163 * \param[in] slot The key slot.
166 The key slot registered reader counter was incremented.
169 * increased, or the slot's state was not PSA_SLOT_FULL.
171 static inline psa_status_t psa_register_read(psa_key_slot_t *slot)
173 if ((slot->state != PSA_SLOT_FULL) ||
174 (slot->registered_readers >= SIZE_MAX)) {
177 slot->registered_readers++;
182 /** Unregister from reading a key slot.
184 * This function decrements the key slot registered reader counter by one.
185 * If the state of the slot is PSA_SLOT_PENDING_DELETION,
189 * global key slot mutex.
191 * \note To ease the handling of errors in retrieving a key slot
195 * \param[in] slot The key slot.
197 * \p slot is NULL or the key slot reader counter has been
200 * The slot's state was neither PSA_SLOT_FULL nor
202 * Or a wipe was attempted and the slot's state was not
206 psa_status_t psa_unregister_read(psa_key_slot_t *slot);
208 /** Wrap a call to psa_unregister_read in the global key slot mutex.
212 * \note To ease the handling of errors in retrieving a key slot
216 * \param[in] slot The key slot.
218 * \p slot is NULL or the key slot reader counter has been
221 * The slot's state was neither PSA_SLOT_FULL nor
223 * Or a wipe was attempted and the slot's state was not
227 psa_status_t psa_unregister_read_under_mutex(psa_key_slot_t *slot);