Code Comments
Programming Forum and web based access to our favorite programming groups.Thanks again. I can't understood what you said completely, so I will take a instance to express what I understood about you said above, would you please check it for me? Thanks very much. There is a process with two threads: T1 and T2 A STREAMS driver and its corresponding device file is /dev/XXX situation 1: T1 and T2 both issue ioctl(fd, ...) at the same time, and the fd is a glable variable in the process. Because of the same fd, these two ioctls will execute on the same stream, they won't be executed concurrently. situation 2: Different from situation1, the fd is not a glable variable, but be got by open(/dev/XXX, ...) separately in T1 and T2. Because of the different fd, these two ioctls will execute on the different stream even though they are on the same driver, they can be executed concurrently, these two ioctls can arrive to the driver at one time on different CPU and different stream. James Carlson wrote: > "tony" <nj_zxw10@hotmail.com> writes: > > That's right -- choosing correctness over performance. > > > Yes, but does it matter? As I pointed out previously, ioctls are > supposed to be control-path operations. If you really have multiple > threads issuing ioctls on a *single* stream and you need to have those > run concurrently, then perhaps ioctls aren't the right design. > > Note that we are talking about per-stream operation here. If you have > multiple streams, they're independent, so you can have multiple ioctls > taking place in a single module -- each on a separate stream. It > isn't as though it's one ioctl per _module_. > > -- > James Carlson, KISS Network <james.d.carlson@sun.com> > Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 > MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.