[dpdk-dev] [PATCH v2 5/6] examples/performance-thread: replace restrict with wrapper
Ruifeng Wang
Ruifeng.Wang at arm.com
Tue Jul 7 04:45:32 CEST 2020
> -----Original Message-----
> From: Joyce Kong <joyce.kong at arm.com>
> Sent: Monday, July 6, 2020 3:49 PM
> To: maxime.coquelin at redhat.com; jerinj at marvell.com;
> zhihong.wang at intel.com; xiaolong.ye at intel.com; beilei.xing at intel.com;
> jia.guo at intel.com; john.mcnamara at intel.com; matan at mellanox.com;
> shahafs at mellanox.com; viacheslavo at mellanox.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; Phil Yang <Phil.Yang at arm.com>;
> Ruifeng Wang <Ruifeng.Wang at arm.com>
> Cc: dev at dpdk.org; nd <nd at arm.com>
> Subject: [PATCH v2 5/6] examples/performance-thread: replace restrict with
> wrapper
>
> '__rte_restrict' is a common wrapper for restricted pointers which can be
> supported by all compilers. Use '__rte_restrict' instead of '__restrict' for
> code consistency.
>
> Signed-off-by: Joyce Kong <joyce.kong at arm.com>
> ---
> .../performance-thread/pthread_shim/pthread_shim.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/examples/performance-thread/pthread_shim/pthread_shim.c
> b/examples/performance-thread/pthread_shim/pthread_shim.c
> index 93e8dca3f..bbc076584 100644
> --- a/examples/performance-thread/pthread_shim/pthread_shim.c
> +++ b/examples/performance-thread/pthread_shim/pthread_shim.c
> @@ -341,9 +341,9 @@ int pthread_cond_signal(pthread_cond_t *cond) }
>
> int
> -pthread_cond_timedwait(pthread_cond_t *__restrict cond,
> - pthread_mutex_t *__restrict mutex,
> - const struct timespec *__restrict time)
> +pthread_cond_timedwait(pthread_cond_t *__rte_restrict cond,
> + pthread_mutex_t *__rte_restrict mutex,
> + const struct timespec *__rte_restrict time)
> {
> NOT_IMPLEMENTED;
> return _sys_pthread_funcs.f_pthread_cond_timedwait(cond,
> mutex, time); @@ -362,10 +362,10 @@ int
> pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) }
>
> int
> -pthread_create(pthread_t *__restrict tid,
> - const pthread_attr_t *__restrict attr,
> +pthread_create(pthread_t *__rte_restrict tid,
> + const pthread_attr_t *__rte_restrict attr,
> lthread_func_t func,
> - void *__restrict arg)
> + void *__rte_restrict arg)
> {
> if (override) {
> int lcore = -1;
> --
> 2.27.0
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
More information about the dev
mailing list