aboutsummaryrefslogtreecommitdiff
path: root/examples/system
diff options
context:
space:
mode:
Diffstat (limited to 'examples/system')
-rw-r--r--examples/system/childexec/child/child.c7
-rw-r--r--examples/system/childexec/parent.c22
2 files changed, 13 insertions, 16 deletions
diff --git a/examples/system/childexec/child/child.c b/examples/system/childexec/child/child.c
index dcfbfaf..b52dd32 100644
--- a/examples/system/childexec/child/child.c
+++ b/examples/system/childexec/child/child.c
@@ -238,11 +238,12 @@ int main(int argc, const char *argv[]) {
display();
}
-
+
+ DrawSync(0);
StopPAD();
-
+ StopCallback();
+
return 0;
-
}
void init(void) {
diff --git a/examples/system/childexec/parent.c b/examples/system/childexec/parent.c
index 83d964c..79c81f1 100644
--- a/examples/system/childexec/parent.c
+++ b/examples/system/childexec/parent.c
@@ -285,31 +285,27 @@ void run_child(void) {
// Copy child executable to its intended adddress
memcpy((void*)exe->param.t_addr, child_exe+2048, exe->param.t_size);
-
- // Prepare for program execution and disable interrupts
- //EnterCriticalSection();
- StopCallback();
- // Stop pads, enable auto acknowledge
+ // Prepare for program execution and disable interrupts
+ DrawSync(0);
StopPAD();
- ChangeClearPAD(1);
- ChangeClearRCnt(3, 1);
+ StopCallback();
+ FlushCache();
// Execute child
- printf("Child exec!\n");
+ printf("Executing child...\n");
Exec(&exe->param, 3, args);
-
+
// Restore interrupts for this PS-EXE
RestartCallback();
- //ExitCriticalSection();
-
+ printf("Child returned\n");
+
// Re-init and re-enable pads
InitPAD(pad_buff[0], 34, pad_buff[1], 34);
StartPAD();
ChangeClearPAD(0);
-
+
// Set this program's display mode
SetDispMask(0);
PutDispEnv(&disp);
-
}