smpcall: add nxsched_smp_call_async and nxsched_smp_call_single_async

reason:
The old implementation of the SMP call, even when using the "no wait" parameter,
could still result in waiting, if invoking it within a critical section
may lead to deadlocks. Therefore, in order to implement a truly asynchronous SMP
call strategy, we have added nxsched_smp_call_async.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2024-10-25 20:23:17 +08:00
committed by Xiang Xiao
parent 2b110ab64e
commit c498991ba4
12 changed files with 252 additions and 129 deletions
+3 -3
View File
@@ -1879,7 +1879,7 @@ int gdb_debugpoint_add(int type, FAR void *addr, size_t size,
point.callback = callback;
point.arg = arg;
return nxsched_smp_call((1 << CONFIG_SMP_NCPUS) - 1,
gdb_smp_debugpoint_add, &point, true);
gdb_smp_debugpoint_add, &point);
#else
return up_debugpoint_add(type, addr, size, callback, arg);
#endif
@@ -1897,8 +1897,8 @@ int gdb_debugpoint_remove(int type, FAR void *addr, size_t size)
point.addr = addr;
point.size = size;
return nxsched_smp_call((1 << CONFIG_SMP_NCPUS) - 1,
gdb_smp_debugpoint_remove, &point, true);
retrun nxsched_smp_call((1 << CONFIG_SMP_NCPUS) - 1,
gdb_smp_debugpoint_remove, &point);
#else
return up_debugpoint_remove(type, addr, size);
#endif