Files
jsix/src/drivers/nulldrv/main.cpp
Justin C. Miller ca2362f858 Simplify task switches
No longer using the rsp from the entry to the kernel, but instead
switching rsp at task-switching time in assembly.

This currently breaks fork()
2019-03-31 22:49:24 -07:00

25 lines
337 B
C++

#include <stdint.h>
#include <stdlib.h>
extern "C" {
int32_t getpid();
int32_t fork();
void sleep(uint64_t til);
void debug();
int main(int, const char **);
}
int
main(int argc, const char **argv)
{
int32_t pid = getpid();
//int32_t child = fork();
debug();
for (int i = 1; i < 5; ++i)
sleep(i*10);
debug();
return 0;
}