Re: Priority of kernel threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, 25 Jan 2002, Swapnil Nagle wrote:

> Hi all,
>
> I want to run a low priority kernel thread, so i did
> something like:
>
> my_thread(){
>     .
>     .
>     .
>    daemonize();
>    current->nice = 20;
>    for(;;){
>       current->state = TASK_INTERRUPTIBLE;
>       schedule();
>        .
>        .  <==== control never comes here
>        .
>    }
> }
>
> The problem is that schedule does not return. So the code after schedule() never gets executed. The control returns
> if schedule_timeout() is used.
>
> What could be the problem?

hmmm. Maybe because you set the task state to TASK_INTERRUPTIBLE and no
one wakes it up?


regards
Roberto

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux