- Subject: Communication between kernel and kernel module
- From: "drewd77.gm" <drewd77.gm@xxxxxxxxx>
- Date: Tue, 22 May 2012 11:18:32 -0700
Hi,
Is there any way to call a function defined in a kernel module from within the kernel proper?
Here's what I'm trying to do:
I'm trying to keep track of when and for how long a process is being executed on the processor, i.e. I need to know when context switches occur.
There is a function called context_switch() in linux/kernel/sched/core.c that is called whenever a context switch happens. I would like to call a function in a kernel module I've written from within context_switch() and pass some data to it.
I've seen how to communicate between user space and kernel space, such as using a file in /dev or using system calls, but not how to communicate within the kernel itself.
Regards,
Drew
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[Newbies FAQ]
[Linux Kernel Development]
[IETF Annouce]
[Git]
[Networking]
[Security]
[Bugtraq]
[Photo]
[Yosemite]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux Networking]
[Linux RAID]
[Linux SCSI]
[Linux ACPI]