Commit 541d4e4d authored by Anton Ivanov's avatar Anton Ivanov Committed by Richard Weinberger

um: Fix naming clash between UML and scheduler

__cant_sleep was already used and exported by the scheduler.
The name had to be changed to a UML specific one.
Signed-off-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Reviewed-by: default avatarPeter Lafreniere <peter@n8pjl.ca>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 32253f00
...@@ -50,7 +50,7 @@ extern void do_uml_exitcalls(void); ...@@ -50,7 +50,7 @@ extern void do_uml_exitcalls(void);
* Are we disallowed to sleep? Used to choose between GFP_KERNEL and * Are we disallowed to sleep? Used to choose between GFP_KERNEL and
* GFP_ATOMIC. * GFP_ATOMIC.
*/ */
extern int __cant_sleep(void); extern int __uml_cant_sleep(void);
extern int get_current_pid(void); extern int get_current_pid(void);
extern int copy_from_user_proc(void *to, void *from, int size); extern int copy_from_user_proc(void *to, void *from, int size);
extern char *uml_strdup(const char *string); extern char *uml_strdup(const char *string);
......
...@@ -220,7 +220,7 @@ void arch_cpu_idle(void) ...@@ -220,7 +220,7 @@ void arch_cpu_idle(void)
um_idle_sleep(); um_idle_sleep();
} }
int __cant_sleep(void) { int __uml_cant_sleep(void) {
return in_atomic() || irqs_disabled() || in_interrupt(); return in_atomic() || irqs_disabled() || in_interrupt();
/* Is in_interrupt() really needed? */ /* Is in_interrupt() really needed? */
} }
......
...@@ -46,7 +46,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) ...@@ -46,7 +46,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
unsigned long stack, sp; unsigned long stack, sp;
int pid, fds[2], ret, n; int pid, fds[2], ret, n;
stack = alloc_stack(0, __cant_sleep()); stack = alloc_stack(0, __uml_cant_sleep());
if (stack == 0) if (stack == 0)
return -ENOMEM; return -ENOMEM;
...@@ -70,7 +70,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) ...@@ -70,7 +70,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
data.pre_data = pre_data; data.pre_data = pre_data;
data.argv = argv; data.argv = argv;
data.fd = fds[1]; data.fd = fds[1];
data.buf = __cant_sleep() ? uml_kmalloc(PATH_MAX, UM_GFP_ATOMIC) : data.buf = __uml_cant_sleep() ? uml_kmalloc(PATH_MAX, UM_GFP_ATOMIC) :
uml_kmalloc(PATH_MAX, UM_GFP_KERNEL); uml_kmalloc(PATH_MAX, UM_GFP_KERNEL);
pid = clone(helper_child, (void *) sp, CLONE_VM, &data); pid = clone(helper_child, (void *) sp, CLONE_VM, &data);
if (pid < 0) { if (pid < 0) {
...@@ -121,7 +121,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, ...@@ -121,7 +121,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
unsigned long stack, sp; unsigned long stack, sp;
int pid, status, err; int pid, status, err;
stack = alloc_stack(0, __cant_sleep()); stack = alloc_stack(0, __uml_cant_sleep());
if (stack == 0) if (stack == 0)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment