In article <[EMAIL PROTECTED]>,
Ivan Passos <[EMAIL PROTECTED]> wrote:
>
>"You could use a semaphore for this. Initialize it to 0, then call
>down() from the ioctl, and up() from the interrupt handler. If the
>up() happens before the down(), the down() won't go to sleep."
>
>Initializing it to
On Thu, 28 Sep 2000, Ivan Passos wrote:
>
> In order to get the configuration of a board, I have to send, from
> userspace, an ioctl to the driver and wait for the board to complete its
> action. The way this is implemented is as follows:
> - In the ioctl, the driver sends a command to the board
In message <[EMAIL PROTECTED]> you write:
> Heh.. I needed to figure this out about 6 months ago. Here's the "right
> answer"
>
> Before sending the command to the board, call
> set_current_state(TASK_UNINTERRUPTIBLE).
*Ahem*
>From Documentation/DocBook/kernel-hacking.tmpl:
Wait Queues
..
You could use a semaphore for this. Initialize it to 0, then call
down() from the ioctl, and up() from the interrupt handler. If the
up() happens before the down(), the down() won't go to sleep.
Nigel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a me
Heh.. I needed to figure this out about 6 months ago. Here's the "right
answer"
Before sending the command to the board, call
set_current_state(TASK_UNINTERRUPTIBLE). This will prevent the scheduler
from interrupting your task, but more importantly it will prevent your task
from being re-schedu
Hello,
In order to get the configuration of a board, I have to send, from
userspace, an ioctl to the driver and wait for the board to complete its
action. The way this is implemented is as follows:
- In the ioctl, the driver sends a command to the board and then goes to
sleep (interruptible_sl
6 matches
Mail list logo