Fixed regression in the demo.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15626 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
c696466411
commit
3b2615a8e6
|
@ -65,10 +65,12 @@ static const sb_config_t sb_config1 = {
|
|||
.regions = {
|
||||
[0] = {
|
||||
.area = {STARTUP_FLASH1_BASE, STARTUP_FLASH1_SIZE},
|
||||
.used = true,
|
||||
.writeable = false
|
||||
},
|
||||
[1] = {
|
||||
.area = {STARTUP_RAM1_BASE, STARTUP_RAM1_SIZE},
|
||||
.used = true,
|
||||
.writeable = true
|
||||
}
|
||||
},
|
||||
|
@ -95,10 +97,12 @@ static const sb_config_t sb_config2 = {
|
|||
.regions = {
|
||||
[0] = {
|
||||
.area = {STARTUP_FLASH2_BASE, STARTUP_FLASH2_SIZE},
|
||||
.used = true,
|
||||
.writeable = false
|
||||
},
|
||||
[1] = {
|
||||
.area = {STARTUP_RAM2_BASE, STARTUP_RAM2_SIZE},
|
||||
.used = true,
|
||||
.writeable = true
|
||||
}
|
||||
},
|
||||
|
@ -118,6 +122,24 @@ static const sb_config_t sb_config2 = {
|
|||
},
|
||||
};
|
||||
|
||||
static const char *sbx1_argv[] = {
|
||||
"sbx1",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx1_envp[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx2_argv[] = {
|
||||
"sbx2",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx2_envp[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Sandbox objects.*/
|
||||
sb_class_t sbx1, sbx2;
|
||||
|
||||
|
@ -215,7 +237,7 @@ int main(void) {
|
|||
/* Starting sandboxed thread 1.*/
|
||||
utp1 = sbStartThread(&sbx1, "sbx1",
|
||||
waUnprivileged1, sizeof (waUnprivileged1),
|
||||
NORMALPRIO - 1, NULL, NULL);
|
||||
NORMALPRIO - 1, sbx1_argv, sbx1_envp);
|
||||
if (utp1 == NULL) {
|
||||
chSysHalt("sbx1 failed");
|
||||
}
|
||||
|
@ -223,7 +245,7 @@ int main(void) {
|
|||
/* Starting sandboxed thread 2.*/
|
||||
utp2 = sbStartThread(&sbx2, "sbx2",
|
||||
waUnprivileged2, sizeof (waUnprivileged2),
|
||||
NORMALPRIO - 1, NULL, NULL);
|
||||
NORMALPRIO - 1, sbx2_argv, sbx2_envp);
|
||||
if (utp1 == NULL) {
|
||||
chSysHalt("sbx2 failed");
|
||||
}
|
||||
|
|
|
@ -65,10 +65,12 @@ static const sb_config_t sb_config1 = {
|
|||
.regions = {
|
||||
[0] = {
|
||||
.area = {STARTUP_FLASH1_BASE, STARTUP_FLASH1_SIZE},
|
||||
.used = true,
|
||||
.writeable = false
|
||||
},
|
||||
[1] = {
|
||||
.area = {STARTUP_RAM1_BASE, STARTUP_RAM1_SIZE},
|
||||
.used = true,
|
||||
.writeable = true
|
||||
}
|
||||
},
|
||||
|
@ -82,16 +84,36 @@ static const sb_config_t sb_config2 = {
|
|||
.regions = {
|
||||
[0] = {
|
||||
.area = {STARTUP_FLASH2_BASE, STARTUP_FLASH2_SIZE},
|
||||
.used = true,
|
||||
.writeable = false
|
||||
},
|
||||
[1] = {
|
||||
.area = {STARTUP_RAM2_BASE, STARTUP_RAM2_SIZE},
|
||||
.used = true,
|
||||
.writeable = true
|
||||
}
|
||||
},
|
||||
// .vfs_driver = (vfs_driver_c *)&root_overlay_driver
|
||||
};
|
||||
|
||||
static const char *sbx1_argv[] = {
|
||||
"sbx1",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx1_envp[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx2_argv[] = {
|
||||
"sbx2",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *sbx2_envp[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Sandbox objects.*/
|
||||
sb_class_t sbx1, sbx2;
|
||||
|
||||
|
@ -207,7 +229,7 @@ int main(void) {
|
|||
/* Starting sandboxed thread 1.*/
|
||||
utp1 = sbStartThread(&sbx1, "sbx1",
|
||||
waUnprivileged1, sizeof (waUnprivileged1),
|
||||
NORMALPRIO - 1, NULL, NULL);
|
||||
NORMALPRIO - 1, sbx1_argv, sbx1_envp);
|
||||
if (utp1 == NULL) {
|
||||
chSysHalt("sbx1 failed");
|
||||
}
|
||||
|
@ -215,7 +237,7 @@ int main(void) {
|
|||
/* Starting sandboxed thread 2.*/
|
||||
utp2 = sbStartThread(&sbx2, "sbx2",
|
||||
waUnprivileged2, sizeof (waUnprivileged2),
|
||||
NORMALPRIO - 1, NULL, NULL);
|
||||
NORMALPRIO - 1, sbx2_argv, sbx2_envp);
|
||||
if (utp1 == NULL) {
|
||||
chSysHalt("sbx2 failed");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue