mirror of
https://github.com/ish-app/ish.git
synced 2025-12-08 17:36:02 +00:00
There was a deadlock when cpu_run called cpu_step_to_interrupt with mem read-locked, and it would write-lock mem to clean up jetsam.
20 lines
543 B
C
20 lines
543 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "kernel/calls.h"
|
|
#include "kernel/task.h"
|
|
#include "xX_main_Xx.h"
|
|
|
|
int main(int argc, char *const argv[]) {
|
|
char envp[100] = {0};
|
|
if (getenv("TERM"))
|
|
strcpy(envp, getenv("TERM") - strlen("TERM") - 1);
|
|
int err = xX_main_Xx(argc, argv, envp);
|
|
if (err < 0) {
|
|
fprintf(stderr, "xX_main_Xx: %s\n", strerror(-err));
|
|
return err;
|
|
}
|
|
do_mount(&procfs, "proc", "/proc", "", 0);
|
|
do_mount(&devptsfs, "devpts", "/dev/pts", "", 0);
|
|
task_run_current();
|
|
}
|