Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14599
b: refs/heads/master
c: 39d730a
h: refs/heads/master
i:
  14597: 60ad0f5
  14595: 8ba2d11
  14591: 0d7116b
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Nov 22, 2005
1 parent 7fbd660 commit 9ccd2fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18317ab0ca5ac0c654be3eac31ebb781b4a5e9b2
refs/heads/master: 39d730ab87f07592e3a3794353f097d5184cae7a
10 changes: 6 additions & 4 deletions trunk/arch/um/kernel/skas/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
/* This is in a separate file because it needs to be compiled with any
* extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled
*/

#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field)

void __attribute__ ((__section__ (".__syscall_stub")))
stub_clone_handler(void)
{
long err;
struct stub_data *from = (struct stub_data *) UML_CONFIG_STUB_DATA;

err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
UML_CONFIG_STUB_DATA + PAGE_SIZE / 2 -
Expand All @@ -30,15 +32,15 @@ stub_clone_handler(void)
goto out;

err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
(long) &from->timer, 0);
(long) &STUB_DATA(timer), 0);
if(err)
goto out;

err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, PAGE_SIZE,
PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED,
from->fd, from->offset);
STUB_DATA(fd), STUB_DATA(offset));
out:
/* save current result. Parent: pid; child: retcode of mmap */
from->err = err;
STUB_DATA(err) = err;
trap_myself();
}

0 comments on commit 9ccd2fb

Please sign in to comment.