Results 1 to 5 of 5
Hi,
I have a wireless lan module mounted on my PXA270 board linux kernel 2.6.19-1 platform. I am using some ioctls available with this wireless lan client module.
I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-07-2010 #1Just Joined!
- Join Date
- Nov 2006
- Location
- Harrisburg, PA, USA
- Posts
- 56
Invoking ioctls for a device from 3 applications
Hi,
I have a wireless lan module mounted on my PXA270 board linux kernel 2.6.19-1 platform. I am using some ioctls available with this wireless lan client module.
I have three applications that invoke these ioctls to access this device. These applications can call these ioctls at any time during the program execution.
1. First application calls wireless tools utility iwconfig that calls ioctl to device.
2. wpa_supplicant application which also calls ioctl to this device.
3. Third application which calls ioctl to read the protocol state of this device (Associated to access point or not).
I did not have a synchronisation routine between these 3 applications. Does kernel synchronise access to device so that at a time only one application can access the device?
Regards,
Sumit
- 06-07-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,160
Not usually. What I usually do in these cases is to have one application/server that does the actual device control, and the applications such as your 3 would send a message to that server to do whatever it is that they need. That nicely serializes the access to the device without the need for semaphores or other locking mechanisms.I did not have a synchronisation routine between these 3 applications. Does kernel synchronise access to device so that at a time only one application can access the device?Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-07-2010 #3Just Joined!
- Join Date
- Nov 2006
- Location
- Harrisburg, PA, USA
- Posts
- 56
Thank you for the reply.
Thas a very good idea. I can achieve it for the two applications that I wrote. But the tird application (wpa_supplicant/iwconfig) is a third party application on which I don't have total control.
How can I achieve this?
Regards,
Sumit
- 06-08-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,160
I'll have to think about that. It may be difficult considering that the third party application may be using any number of means to access the device. If you could determine that it is using a shared library (not a static library or functions) to access and control the device, then it may be possible to replace the standard library with one that is talking to the server that your own applications use for controlling the device. Alternative, you could modify the kernel or device driver that all of the applications have to use. Neither of these options are simple, and only a kernel or driver mod would allow you to be sure you controlled access from third party applications.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-08-2010 #5Just Joined!
- Join Date
- Nov 2006
- Location
- Harrisburg, PA, USA
- Posts
- 56
Thanks for the ideas.
Regards,
Sumit


Reply With Quote

