Re: scheduler hook?

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

 



On Thu, 25 Oct 2001, Luís Henriques wrote:

> > I'm developping a module that needs to monitor a specific user process.
> > This module needs to know when that process is scheduled in order to set
> > the intel debug registers (it needs to know when a specific memory address
> > is accessed). What is the best approach? Is it to hook the linux scheluder?

OK, this is indeed best done in the scheduler. You can
probably go for a 2-phase approach:

1) use a function pointer in the task struct, which
   is set for each task when your module is loaded

2) somewhere in the scheduler code (when a process is
   selected):

	if (p->schedule_profile)
		... call the magic function pointer

regards,

Rik
-- 
DMCA, SSSCA, W3C?  Who cares?  http://thefreeworld.net/

http://www.surriel.com/		http://distro.conectiva.com/

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux