/* RCU torture fake writer kthread. Repeatedly calls sync, with a random delay between calls.  */
static int rcu_torture_fakewriter(void *arg)
/* RCU torture fake writer kthread. Repeatedly calls sync, with a random delay between calls.  */
static int rcu_torture_fakewriter(void *arg)
{
	DEFINE_RCU_RANDOM(rand);
	VERBOSE_PRINTK_STRING("rcu_torture_fakewriter task started");
	set_user_nice(current, 19);
	do {
		schedule_timeout_uninterruptible(1 + rcu_random(&rand)%10);
		udelay(rcu_random(&rand) & 0x3ff);
		cur_ops->sync();
		rcu_stutter_wait("rcu_torture_fakewriter");
	} while (!kthread_should_stop() && fullstop == FULLSTOP_DONTSTOP);
	VERBOSE_PRINTK_STRING("rcu_torture_fakewriter task stopping");
	rcutorture_shutdown_absorb("rcu_torture_fakewriter");
	while (!kthread_should_stop())
		schedule_timeout_uninterruptible(1);
	return 0;
}