Handle cli/sti in scheduler: fake i flag with id flag.

This commit is contained in:
2020-05-09 06:41:32 +03:00
parent 0d07b5810f
commit 90d1aaaccc
3 changed files with 25 additions and 15 deletions

View File

@@ -6,13 +6,15 @@
sigjmp_buf trampoline;
__attribute__((__stdcall__))
uint32_t umka_sched_add_thread(appdata_t *app) {
fprintf(stderr, "umka_new_sys_threads before\n");
fprintf(stderr, "kos_task_count: %d\n", kos_task_count);
if (!sigsetjmp(trampoline, 1)) {
__asm__ __inline__ __volatile__ (
"pushfd;"
"bts dword ptr [esp], 21;"
"popfd;"
"mov esp, eax"
:
: "a"(app->saved_esp)