git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed stack changing in SYS_CLONE
[tpg/acess2.git]
/
Usermode
/
Applications
/
init_src
/
main.c
diff --git
a/Usermode/Applications/init_src/main.c
b/Usermode/Applications/init_src/main.c
index
55c4801
..
b205e3b
100644
(file)
--- a/
Usermode/Applications/init_src/main.c
+++ b/
Usermode/Applications/init_src/main.c
@@
-22,14
+22,13
@@
int main(int argc, char *argv[])
write(1, 13, "Hello, World!");
tid = clone(CLONE_VM, 0);
write(1, 13, "Hello, World!");
tid = clone(CLONE_VM, 0);
+ __asm__ __volatile__("xchg %%bx, %%bx"::"a"(tid));
if(tid == 0)
{
execve(DEFAULT_SHELL, NULL, NULL);
for(;;) __asm__ __volatile__("hlt");
}
if(tid == 0)
{
execve(DEFAULT_SHELL, NULL, NULL);
for(;;) __asm__ __volatile__("hlt");
}
- __asm__ __volatile__("xchg %%bx, %%bx"::"a"(tid));
-
for(;;) sleep();
return 42;
for(;;) sleep();
return 42;
UCC
git Repository :: git.ucc.asn.au