#include <linux/err.h>
#include <linux/unistd.h>
#include <linux/file.h>
+#include <linux/module.h>
#include <asm/semaphore.h>
struct kthread_create_info
{
return (kthread_stop_info.k == current);
}
-
+EXPORT_SYMBOL(kthread_should_stop);
static void kthread_exit_files(void)
{
void *data;
sigset_t blocked;
int ret = -EINTR;
- cpumask_t mask = CPU_MASK_ALL;
kthread_exit_files();
flush_signals(current);
/* By default we can run anywhere, unlike keventd. */
- set_cpus_allowed(current, mask);
+ set_cpus_allowed(current, CPU_MASK_ALL);
/* OK, tell user we're spawned, wait for stop or wakeup */
__set_current_state(TASK_INTERRUPTIBLE);
return create.result;
}
+EXPORT_SYMBOL(kthread_create);
void kthread_bind(struct task_struct *k, unsigned int cpu)
{
set_task_cpu(k, cpu);
k->cpus_allowed = cpumask_of_cpu(cpu);
}
+EXPORT_SYMBOL(kthread_bind);
int kthread_stop(struct task_struct *k)
{
return ret;
}
+EXPORT_SYMBOL(kthread_stop);