Re: Moving data from kernel to user space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> What is the best way to go about doing this?
>
> The module will be collecting huge amounts of data. So
> I guess it would be best if the user app keeps
> querying the module for data in a periodic fashion.
> Once the task is done the user mode app can remove the
> module.

Maybe a better way would be for the module to install a syscall or similar
entry, and the userspace program could provide a buffer to store the data
in.  Then, kernel space wouldn't have to worry about masses of data, and
just use copy_to_user() to transfer the data into the given buffer.

When the program wants to finish gathering data, they just call another
system call, and maybe have another system call for changing buffers.  You
might also have a signal that is delivered when the buffer needs changing.

Jon
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017


_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux