Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All! I have a problem while putting a threat to sleep. While it is sleeping, it seems, the console is freezing (it doesn't allow any input.(neither with minicom nor ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    15

    [SOLVED] a question about schedule() and schedule_timeout(timeout)

    Hi All!

    I have a problem while putting a threat to sleep. While it is sleeping, it seems, the console is freezing (it doesn't allow any input.(neither with minicom nor ssh or telnet), so i can't get any current information).
    it tried
    - schedule()
    - schedule_timeout(timeout) // at least, calling this function, i can get printk's on the screen after the timeout expires
    - wait_event(&wq) or with
    - wait_event_interruptible(&wq, condition)

    => always the same result -> no input possible!

    I'm at a loss, so any suggestions are very welcome!

    Thanks in advance and
    Kind regards!

  2. #2
    Just Joined!
    Join Date
    Jul 2008
    Posts
    15
    ADD ON:

    calling the function wait_event_interruptible(), the process remains in the schedule() part of the

    #define __wait_event_interruptible(wq, condition, ret)-function in the <linux/wait.h>-file. (line 233).

    A part of my Code is here: http://www.linuxforums.org/forum/lin...rruptible.html
    Could it be possible, that there are missing some flags of current->flags? (at the moment, printk("%08x", current->flags) give 0x800040)
    Or should I take a closer look again to the configuration of the MPC? (But the released Interrupts are handled normally. It's just the thread, that don't want to "sleep")

    Any ideas? - I don't know where to start looking...

    Thanks in advance!


    P.S.: Sorry - I forgot to post some additional information:
    Linux-Kernel 2.6.16.11-rt18
    Crosscompiler: gcc-3.4.3-glibc-2.3.6-1 for MPC5200 (PowerPC)

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    15
    Got it!

    I forgot to include <linux/version.h>

    now it's working fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...