MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / SysSpawnThread

Function SysSpawnThread

Kernel/src/arch/x86_64/syscalls.cpp:1911–1915  ·  view source on GitHub ↗

//////////////////////// \brief SysSpawnThread(entry, stack) Spawn a new thread under current process \param entry - (uintptr_t) Thread entry point \param stack - (uintptr_t) Thread's stack \return (pid_t) thread id ////////////////////////

Source from the content-addressed store, hash-verified

1909/// \return (pid_t) thread id
1910/////////////////////////////
1911long SysSpawnThread(regs64_t* r){
1912 auto tid = Scheduler::CreateChildThread(Scheduler::GetCurrentProcess(), SC_ARG0(r), SC_ARG1(r), USER_CS, USER_SS);
1913
1914 return tid;
1915}
1916
1917/////////////////////////////
1918/// \brief SysExitThread(retval) Exit a thread

Callers

nothing calls this directly

Calls 2

CreateChildThreadFunction · 0.85
GetCurrentProcessFunction · 0.85

Tested by

no test coverage detected