aplication user and kernel mode (data access)
aplication user and kernel mode (data access)
hi all,
i am trying to setup a program to use a device driver and am confusing buffer access between user and kernel mode. i think all applications running in user space have to communicate with the device drivers using io control calls and then have some functions called back from the driver app.
in this model, i guess the user app passes buffer pointer values to the driver
using the ioctl calls. is that what happens? for example, i have a session
context struct created by the user app using malloc. would that data have to
be copied to the driver for it to be used, or could i just pass a pointer to
the struct?
is using ioctl calls the only way to 'switch to kernel mode'??
also, am i right in saying the process running on the device driver is
separate from the one running in the application? how does that work in
relation to a threaded application? must a new thread be created with each
function call back?
you can probably tell i am very confused here, so any help is greatly
apreciated!
regards,
|