aboutsummaryrefslogtreecommitdiff
path: root/emu
diff options
context:
space:
mode:
authorbhgv <bhgv.empire@gmail.com>2020-06-15 07:50:02 +0300
committerbhgv <bhgv.empire@gmail.com>2020-06-15 07:50:02 +0300
commit9477d7988480fc5f1040e9c13877e38f79198e0c (patch)
tree29e21e718815737c75cdab2c9310c06362abc7b5 /emu
parent29cea60e3fae0a5e6b758aab62bfc5d160153576 (diff)
sup. FreeRTOS riscV-64 (k210 cpu). 6th stepHEADmaster
Diffstat (limited to 'emu')
-rw-r--r--emu/FreeRTOS/os.c22
-rw-r--r--emu/port/fns.h2
2 files changed, 17 insertions, 7 deletions
diff --git a/emu/FreeRTOS/os.c b/emu/FreeRTOS/os.c
index 12056dc..38ed207 100644
--- a/emu/FreeRTOS/os.c
+++ b/emu/FreeRTOS/os.c
@@ -51,6 +51,9 @@ int gidnobody = -1;
int uidnobody = -1;
//{} static struct termios tinit;
+void (*coherence)(void) = nofence;
+
+
static void
sysfsa_flagsault(char *what, void *addr)
{
@@ -176,37 +179,42 @@ osreboot(char *file, char **argv)
{
if(dflag == 0)
termrestore();
- execvp(file, argv);
+// execvp(file, argv);
error("reboot failure");
}
void
libinit(char *imod)
{
- struct sigaction act;
- struct passwd *pw;
+// struct sigaction act;
+// struct passwd *pw;
Proc *p;
- char sys[64];
+// char sys[64];
+ char* sys = "k210-freertos";
- setsid();
+// setsid();
- gethostname(sys, sizeof(sys));
+// gethostname(sys, sizeof(sys));
kstrdup(&ossysname, sys);
+/*
pw = getpwnam("nobody");
if(pw != nil) {
uidnobody = pw->pw_uid;
gidnobody = pw->pw_gid;
}
+*/
if(dflag == 0)
termset();
+/*
memset(&act, 0, sizeof(act));
act.sa_handler = trapUSR1;
sigaction(SIGUSR1, &act, nil);
act.sa_handler = SIG_IGN;
sigaction(SIGCHLD, &act, nil);
+*/
/*
* For the correct functioning of devcmd in the
@@ -235,6 +243,7 @@ libinit(char *imod)
p = newproc();
kprocinit(p);
+/*
pw = getpwuid(getuid());
if(pw != nil)
kstrdup(&eve, pw->pw_name);
@@ -243,6 +252,7 @@ libinit(char *imod)
p->env->uid = getuid();
p->env->gid = getgid();
+*/
emuinit(imod);
}
diff --git a/emu/port/fns.h b/emu/port/fns.h
index 9ff80f2..75960e4 100644
--- a/emu/port/fns.h
+++ b/emu/port/fns.h
@@ -30,7 +30,7 @@ Dir* chandirstat(Chan*);
void cinit(void);
char* clipread(void);
int clipwrite(char*);
-void (*coherence)(void);
+extern void (*coherence)(void);
void copen(Chan*);
void cmderror(Cmdbuf*, char*);
Block* concatblock(Block*);