mirror of
https://github.com/Fennix-Project/Userspace.git
synced 2025-05-28 15:34:26 +00:00
Sleep before checking again if the thread is critical
This commit is contained in:
parent
f1c703452d
commit
9242471469
@ -308,9 +308,10 @@ bool ELFDynamicReallocation(void *ElfFile, void *MemoryImage)
|
|||||||
int ld_main()
|
int ld_main()
|
||||||
{
|
{
|
||||||
/* Prevent race condition. */
|
/* Prevent race condition. */
|
||||||
uintptr_t KCTL_ret = 0xdead;
|
uintptr_t KCTL_ret = KernelCTL(KCTL_IS_CRITICAL, 0, 0, 0, 0);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
syscall1(_Sleep, 250);
|
||||||
KCTL_ret = KernelCTL(KCTL_IS_CRITICAL, 0, 0, 0, 0);
|
KCTL_ret = KernelCTL(KCTL_IS_CRITICAL, 0, 0, 0, 0);
|
||||||
} while (KCTL_ret == SYSCALL_ACCESS_DENIED);
|
} while (KCTL_ret == SYSCALL_ACCESS_DENIED);
|
||||||
|
|
||||||
@ -319,20 +320,14 @@ int ld_main()
|
|||||||
|
|
||||||
/* --------------------------------------------------- */
|
/* --------------------------------------------------- */
|
||||||
|
|
||||||
__asm__ __volatile__("syscall"
|
syscall2(_Print, 'H', 0);
|
||||||
:
|
|
||||||
: "a"(1), "D"('H'), "S"(0)
|
|
||||||
: "rcx", "r11", "memory");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Actual load */
|
/* Actual load */
|
||||||
int ld_load(int argc, char *argv[], char *envp[])
|
int ld_load(int argc, char *argv[], char *envp[])
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("syscall"
|
syscall2(_Print, 'L', 0);
|
||||||
:
|
|
||||||
: "a"(1), "D"('L'), "S"(0)
|
|
||||||
: "rcx", "r11", "memory");
|
|
||||||
|
|
||||||
void *IPCBuffer = (void *)RequestPages(1);
|
void *IPCBuffer = (void *)RequestPages(1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user