X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fkernel%2Fsamples%2Fworkqueue%2F.git;a=blobdiff_plain;f=block_wq.c;fp=block_wq.c;h=751728c906e9d1568ccc762c99449dbda7cd171f;hp=ae6d8abf8b38a7b2aa13eb98f58f9a363535971d;hb=8a97a11b951444897afcdca19721284b72e14539;hpb=271a17e550236d7cfc14385a1b20f692e23de0af diff --git a/block_wq.c b/block_wq.c index ae6d8ab..751728c 100644 --- a/block_wq.c +++ b/block_wq.c @@ -29,12 +29,9 @@ MODULE_AUTHOR("Thadeu Lima de Souza Cascardo"); static void work_block(struct work_struct *work) { - unsigned long tmp = jiffies + 5 * HZ; printk(KERN_INFO "Blocking other works in the queue\n"); printk(KERN_INFO "Executing task in CPU %d\n", smp_processor_id()); - /* We also kick the CPU high */ - while (!time_after(jiffies, tmp)) - cpu_relax(); + msleep(5); } static void work_print(struct work_struct *work)