From eecfc273610010988ed9f92c1c533f7711a9a491 Mon Sep 17 00:00:00 2001 From: Hatim-Pierre FAZILEABASSE Date: Mon, 12 Feb 2024 20:56:51 +0100 Subject: [PATCH] docs(profiler): fix my_get_cpu_cb implementation (#5641) Signed-off-by: Hatim-Pierre FAZILEABASSE --- docs/overview/profiler.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/overview/profiler.rst b/docs/overview/profiler.rst index 9f97dccc0..f67bb1cea 100644 --- a/docs/overview/profiler.rst +++ b/docs/overview/profiler.rst @@ -60,7 +60,9 @@ To enable the profiler, set :c:macro:`LV_USE_PROFILER` in ``lv_conf.h`` and conf static int my_get_cpu_cb(void) { - return (int)syscall(SYS_getcpu); + int cpu_id = 0; + syscall(SYS_getcpu, &cpu_id, NULL); + return cpu_id; } void my_profiler_init(void)