Revert "arch: sim: Workaround to make the IPI work on macOS"

This reverts commit b68fc9eb1d.
This commit is contained in:
Masayuki Ishikawa 2021-07-22 22:53:21 +09:00 committed by Xiang Xiao
parent 2ef6428aa8
commit 4f1e63f939

View File

@ -212,6 +212,7 @@ int up_cpu_index(void)
int sim_cpu_start(int cpu, void *stack, size_t size)
{
struct sim_cpuinfo_s cpuinfo;
pthread_attr_t attr;
int ret;
/* Initialize the CPU info */
@ -226,19 +227,11 @@ int sim_cpu_start(int cpu, void *stack, size_t size)
* in a multi-CPU hardware model.
*/
#ifdef __APPLE__
/* NOTE: workaround to make IPI work on macOS */
ret = pthread_create(&g_cpu_thread[cpu],
NULL, sim_idle_trampoline, &cpuinfo);
#else
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstack(&attr, stack, size);
ret = pthread_create(&g_cpu_thread[cpu],
&attr, sim_idle_trampoline, &cpuinfo);
pthread_attr_destroy(&attr);
#endif
if (ret != 0)
{
goto errout_with_cond;