if (spin_until_us - now > (1000000/HZ)+1) { current->state = TASK_INTERRUPTIBLE; schedule_timeout(1); } else if (spin_until_us - now > 100) { 
if (spin_until_us - now > jiffies_to_usecs(1)+1) schedule_timeout_interruptible(1); else if (spin_until_us - now > 100) { 
static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us){	__u64 start;	__u64 now;	start = now = getCurUs();	printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));	while (now < spin_until_us) {		/* TODO: optimise sleeping behavior */		if (spin_until_us - now > (1000000/HZ)+1) {			current->state = TASK_INTERRUPTIBLE;			schedule_timeout(1);		} else if (spin_until_us - now > 100) {			do_softirq();			if (!pkt_dev->running)				return;			if (need_resched())				schedule();		}		now = getCurUs();	}	pkt_dev->idle_acc += now - start;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/121caf577dc61588c1128821873a08cec48baf58/pktgen.c/buggy/net/core/pktgen.c