Пример #1
0
/**
 * Starts a kernel thread on the specified CPU.
 */
static void *
palacios_create_thread_on_cpu(
	int			cpu_id, 
	int			(*fn)(void * arg), 
	void *			arg, 
	char *			thread_name
)
{
	return kthread_create_on_cpu(cpu_id, fn, arg, thread_name);
}
Пример #2
0
static void __shutdown_handler(void *unused)
{
	int err;

	if (shutting_down != SHUTDOWN_SUSPEND)
		err = kernel_thread(shutdown_process, NULL,
				    CLONE_FS | CLONE_FILES);
	else
#ifndef CONFIG_XEN /* pv-on-hvm */
		err = kthread_create_on_cpu(xen_suspend, NULL, "suspend", 0);
#else /* domU */
		err = kthread_create_on_cpu(__do_suspend, NULL, "suspend", 0);
#endif

	if (err < 0) {
		printk(KERN_WARNING "Error creating shutdown process (%d): "
		       "retrying...\n", -err);
		schedule_delayed_work(&shutdown_work, HZ/2);
	}
}