How does a blocking select return (kernel)?
I've been looking around but could not find anything that's relevant to kernel space.
I'm having trouble understanding how a blocking select (timeout = NULL) would return.
For instance, in the 2.6 kernel, if do_select() doesn't find any sockets available for read, it would block with schedule_timeout(MAX_SCHEDULE_TIMEOUT) with current->state = TASK_INTERRUPTIBLE.
Now when the read resource becomes available, how does the kernel put the blocked task (select() caller) back on the runqueue?
Thanks in advance for any help or pointers to other documentation.