lkml.org 
[lkml]   [2001]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSelect call for a device driver problem
Hello people out there,
We are writing a driver for a device which can be read and written. When a
process tries to read from it and there is nothing in its buffer, we tell
it
to sleep until another process writes to the device. When writing, if the
buffer is full, we tell it to sleep until something is read from the
device.
This is done in the read and write operations for the device, and they
work
well. However, when we do a select on a file descriptor of the device, we
go
right through it and the process is never blocked. What am I doing wrong?
Am
I supposed to check whether the device is opened O_RDONLY, O_WRONLY,
O_RDWR?
If so, where do I do that?
Please include this address in any answer since I'm not
subscribed to the list.
Edgardo Hames
ehames@hal.famaf.unc.edu.ar
Julio Bianco
jbianco@hal.famaf.unc.edu.ar

--
Edgardo Hames

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.015 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site