Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12369

What is the correct usage of wake_up_interruptible() in linux kernel 4.12?

$
0
0

I have two functions, the kernel thread which blocks on

Work Kernel Thread()
{
 set_current_state(TASK_INTERRUPTIBLE);
wait_event_interruptible(..work.queue, condition)
  __set_current_state(TASK_RUNNING);
}

ISR
{

  wake_up_interruptible(..work queue..)
}

However, when I execute, the kernel complains that the

  WARNING: CPU: 0 PID: 565 at /usr/src/kernel/kernel/sched/core.c:6234 __might_sleep+0x78/0x9c 
    do not call blocking ops when !TASK_RUNNING; state=1 set at 0x...

Viewing all articles
Browse latest Browse all 12369

Trending Articles