Open peresun opened 3 years ago
Hi! Yeah, and also there's a pause code in sleeplock... We definitely need to support these things. I'm not realy an expert in ARM assembler, but I think we can come up with something. Anyway, PR would be welcome!
Thanks for your reply. Now I use ucontext to get rid of writing arm asm, acutally odyssey has used uncontext to implement coroutines in history. I changed the interface of mm_context_create, So mm_scheduler_new look like:
#if __i386__ || __x86_64__
mm_context_create(&coroutine->context, &coroutine->stack,mm_scheduler_main, coroutine);
#else
mm_context_create(&coroutine->context, &(scheduler->main.context), &coroutine->stack,mm_scheduler_main, coroutine);
#endif
Performance may not be the best, but it can work. Is there any potential problem?
@peresun do you have the changes available somewhere?
With M1 chips, this is getting even more relevant. Would be great to merge your changes @peresun.
Machinarium does not support arm, mostly because mm_context_swap is written using x86 assembly.
Is there a way to make Machinarium support arm?
Thanks.