diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-09-19 04:47:49 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-09-19 04:47:49 -0400 |
commit | 044a500e46742d39d22f1781cfb64ba93b463e39 (patch) | |
tree | b0313211ea7ba26b90c1083ade0e4c9f486b87db /arch/um/os-Linux/tt.c | |
parent | f6098cf449b81c14a51e48dd22ae47d03126a1de (diff) | |
parent | 6c0741fbdee5bd0f8ed13ac287c4ab18e8ba7d83 (diff) |
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'arch/um/os-Linux/tt.c')
-rw-r--r-- | arch/um/os-Linux/tt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c index 5b047ab8416a..a6db8877931a 100644 --- a/arch/um/os-Linux/tt.c +++ b/arch/um/os-Linux/tt.c | |||
@@ -36,6 +36,20 @@ | |||
36 | #include "mode.h" | 36 | #include "mode.h" |
37 | #include "tempfile.h" | 37 | #include "tempfile.h" |
38 | 38 | ||
39 | int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, | ||
40 | int must_succeed) | ||
41 | { | ||
42 | int err; | ||
43 | |||
44 | err = os_protect_memory((void *) addr, len, r, w, x); | ||
45 | if(err < 0){ | ||
46 | if(must_succeed) | ||
47 | panic("protect failed, err = %d", -err); | ||
48 | else return(err); | ||
49 | } | ||
50 | return(0); | ||
51 | } | ||
52 | |||
39 | /* | 53 | /* |
40 | *------------------------- | 54 | *------------------------- |
41 | * only for tt mode (will be deleted in future...) | 55 | * only for tt mode (will be deleted in future...) |