1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add code to context switch ?

Discussion in 'C' started by laro, Jul 15, 2010.

  1. laro

    laro New Member

    Joined:
    Jul 1, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    I write a program that simulate the task manager in windows.

    for this task,

    I Need to know how can I call to a function after a context switch ?
    How can i add pointer function at the end of the context switch ?

    I want to do it in Linux, and in Windows ?

    (I think it has a relation with Hook, but not sure, and don't know how)..

    Thank's
     
  2. LordN3mrod

    LordN3mrod New Member

    Joined:
    Sep 4, 2010
    Messages:
    22
    Likes Received:
    11
    Trophy Points:
    0
    Occupation:
    Software Developer
    Location:
    Yerevan, Armenia
    If you mean, does the operating system emit any event upon context switch which you can handle, then the answer is no, neither linux nor windows allow that. I don't know about other operating systems
     

Share This Page