Re: Moving data from kernel to user space

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

 



For adding system calls, does the kernel have to be
recompiled? I am relatively new to this, so if someone
could guide me on how exactly to add a new system
call, it would be very helpful.

However, for my purposes, I really do not want to
recompile the kernel. So if this is required in order
to add a system call, could someone suggest some other
way of moving data from kernel to user space?

Thanks
Krishna

--- Jonathan Bartlett <johnnyb@xxxxxxxxxx> wrote:
> > 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
> 



		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 


_______________________________________________
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