[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Schedule in task_queues works ?



Hi
  I have one interesting doubt
  Please have a look at small piece of code 

void   print()
  {
   printk("The current process %s\n",current->comm);
   schedule();
   printk(" The current process %s\n",current->comm);
  }

 struct tq_struct task1;
 
  int init_module(void)
 {
  task1.routine=print;
  task1.data=NULL;
  queue_task(&task1,&tq_scheduler);
 }


The moment this module is loaded, 
  The first printk in print function is executed and displays
  current process  "insmod"
   My question is why it not executing second printk statement after
   schedule.
   But if i use schedule with timeout, i am get in it.