Messages in this thread | | | Date | Sat, 24 Jul 1999 12:33:59 +1000 | From | Dancer <> | Subject | Re: Strangest bug |
| |
Stanislav Krasilovskiy wrote: > > > yes, because occasionally the system is executing another process (or the > > idle thread), in which context that user-space pointer makes no sense. > > > > the solution: copy the data into kernel-space, then use this kernel-space > > data from interrupts. > > > > -- mingo > > Dear Mingo and others, > > Thanks for your help! That explains the bug. > > But what if I absolutely need to retrieve the latest values from the > structure (now placed in kernel space) at the time of the interrupt, and > somehow allow the user space process to access/modify it sometimes? How > would I do that? > > I searched the 'net for this, and came across a posting mentioning > something similar to setting up a DMA in sound drivers, i.e. setting up > an area in kernel space, locking it and allowing the user proceess to mmap > it into its own memory. > > Can something like that be used in my case? Do you know if there's sample > code for doing something like this anywhere?
You've made a custom kernel call, right? Adapt it to set/get the structure:
custom_call(DATA_GET,&structure_address); // Kernel fills in structure with current data custom_call(DATA_SET,&structure_address); // Kernel copies data from supplied structure
D
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |