struct rte_rcu_qsbr_dq;
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Return the size of the memory occupied by a Quiescent State variable.
*
* @param max_threads
* Possible rte_errno codes are:
* - EINVAL - max_threads is 0
*/
-__rte_experimental
size_t
rte_rcu_qsbr_get_memsize(uint32_t max_threads);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Initialize a Quiescent State (QS) variable.
*
* @param v
* - EINVAL - max_threads is 0 or 'v' is NULL.
*
*/
-__rte_experimental
int
rte_rcu_qsbr_init(struct rte_rcu_qsbr *v, uint32_t max_threads);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Register a reader thread to report its quiescent state
* on a QS variable.
*
* the QS variable. thread_id is a value between 0 and (max_threads - 1).
* 'max_threads' is the parameter passed in 'rte_rcu_qsbr_init' API.
*/
-__rte_experimental
int
rte_rcu_qsbr_thread_register(struct rte_rcu_qsbr *v, unsigned int thread_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Remove a reader thread, from the list of threads reporting their
* quiescent state on a QS variable.
*
* Reader thread with this thread ID will stop reporting its quiescent
* state on the QS variable.
*/
-__rte_experimental
int
rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Add a registered reader thread, to the list of threads reporting their
* quiescent state on a QS variable.
*
* Reader thread with this thread ID will report its quiescent state on
* the QS variable.
*/
-__rte_experimental
static __rte_always_inline void
rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
{
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Remove a registered reader thread from the list of threads reporting their
* quiescent state on a QS variable.
*
* rte_rcu_qsbr_check API will not wait for the reader thread with
* this thread ID to report its quiescent state on the QS variable.
*/
-__rte_experimental
static __rte_always_inline void
rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
{
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Acquire a lock for accessing a shared data structure.
*
* This is implemented as a lock-free function. It is multi-thread
* @param thread_id
* Reader thread id
*/
-__rte_experimental
static __rte_always_inline void
rte_rcu_qsbr_lock(__rte_unused struct rte_rcu_qsbr *v,
__rte_unused unsigned int thread_id)
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Release a lock after accessing a shared data structure.
*
* This is implemented as a lock-free function. It is multi-thread
* @param thread_id
* Reader thread id
*/
-__rte_experimental
static __rte_always_inline void
rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
__rte_unused unsigned int thread_id)
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Ask the reader threads to report the quiescent state
* status.
*
* - This is the token for this call of the API. This should be
* passed to rte_rcu_qsbr_check API.
*/
-__rte_experimental
static __rte_always_inline uint64_t
rte_rcu_qsbr_start(struct rte_rcu_qsbr *v)
{
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Update quiescent state for a reader thread.
*
* This is implemented as a lock-free function. It is multi-thread safe.
* @param thread_id
* Update the quiescent state for the reader with this thread ID.
*/
-__rte_experimental
static __rte_always_inline void
rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
{
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Checks if all the reader threads have entered the quiescent state
* referenced by token.
*
* - 1 if all reader threads have passed through specified number
* of quiescent states.
*/
-__rte_experimental
static __rte_always_inline int
rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
{
}
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Wait till the reader threads have entered quiescent state.
*
* This is implemented as a lock-free function. It is multi-thread safe.
* on this QS variable (i.e. the calling thread is also part of the
* readside critical section). If not, pass RTE_QSBR_THRID_INVALID.
*/
-__rte_experimental
void
rte_rcu_qsbr_synchronize(struct rte_rcu_qsbr *v, unsigned int thread_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Dump the details of a single QS variables to a file.
*
* It is NOT multi-thread safe.
* Possible rte_errno codes are:
* - EINVAL - NULL parameters are passed
*/
-__rte_experimental
int
rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v);