- Update allocate_new_qp_group to take unsigned int
- Move id_ctr in rcu_lock_st for better stack alignment
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26972)
(cherry picked from commit
7097d2e00ea9f0119a5e42f13a51487fb1e67aa3)
/* The context we are being created against */
OSSL_LIB_CTX *ctx;
- /* rcu generation counter for in-order retirement */
- uint32_t id_ctr;
-
/* Array of quiescent points for synchronization */
struct rcu_qp *qp_group;
+ /* rcu generation counter for in-order retirement */
+ uint32_t id_ctr;
+
/* Number of elements in qp_group array */
uint32_t group_count;
}
static struct rcu_qp *allocate_new_qp_group(CRYPTO_RCU_LOCK *lock,
- int count)
+ uint32_t count)
{
struct rcu_qp *new =
OPENSSL_zalloc(sizeof(*new) * count);
struct rcu_lock_st {
struct rcu_cb_item *cb_items;
OSSL_LIB_CTX *ctx;
- uint32_t id_ctr;
+
+ /* Array of quiescent points for synchronization */
struct rcu_qp *qp_group;
+
+ /* rcu generation counter for in-order retirement */
+ uint32_t id_ctr;
+
+ /* Number of elements in qp_group array */
uint32_t group_count;
uint32_t next_to_retire;
volatile long int reader_idx;
};
static struct rcu_qp *allocate_new_qp_group(struct rcu_lock_st *lock,
- int count)
+ uint32_t count)
{
struct rcu_qp *new =
OPENSSL_zalloc(sizeof(*new) * count);