diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2024-05-03 17:05:02 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2024-05-17 16:26:18 +0300 |
commit | 5c79142156d9d37e38fced9d9e25889929f24ede (patch) | |
tree | 4ac3c9bf881465669f31fb13698ef46e3c095035 | |
parent | 6622e8d78703837a175e57f77a0efeecaa9bf13b (diff) |
linux-gen: tm: use CPU pause API call
Use API call instead of _odp_cpu_pause(), which is used to
implement the API call.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r-- | platform/linux-generic/odp_traffic_mngr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 2de851dfc..6311c941d 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -7,6 +7,7 @@ #include <odp_posix_extensions.h> +#include <odp/api/cpu.h> #include <odp/api/packet.h> #include <odp/api/packet_flags.h> #include <odp/api/std_types.h> @@ -2420,7 +2421,7 @@ static void signal_request(void) serving = odp_atomic_load_u64(&tm_glb->currently_serving_cnt); while (serving != request_num) { - _odp_cpu_pause(); + odp_cpu_pause(); serving = odp_atomic_load_u64(&tm_glb->currently_serving_cnt); } } @@ -2437,11 +2438,11 @@ static void check_for_request(void) /* Signal the other requesting thread to proceed and then * wait for their done indication */ odp_atomic_inc_u64(&tm_glb->currently_serving_cnt); - _odp_cpu_pause(); + odp_cpu_pause(); done_cnt = odp_atomic_load_u64(&tm_glb->atomic_done_cnt); while (done_cnt != request_num) { - _odp_cpu_pause(); + odp_cpu_pause(); done_cnt = odp_atomic_load_u64(&tm_glb->atomic_done_cnt); } } |