[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xenomai-main] thread switch hookl
From: |
Christian GAGNERAUD |
Subject: |
[Xenomai-main] thread switch hookl |
Date: |
Thu, 27 Nov 2003 16:07:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 |
Hi,
I'm playing with the thread switch hook functionality, but i think that
the switch hook is not call in schedule() at the right place.
I explain me:
The hook is called in the second part of the schedule routine (after the
contexte switch), so the hook() will be called only when the preemted
thread will be reschedule (if it didn't die).
Moreover the Documentation said that the hook is called with "the
descriptor address of the thread which has been switched out" as
parameter, but it seems to be false since in schedule the call is:
xnpod_fire_callouts(&nkpod->tswitchq,sched->runthread);
so the sched->runthread value will be passed to the hook, but the hook
parameter value is the same as the value return by
xnpod_current_thread(). So we can't know in this hook both the prempted
thread and the incoming thread. :(
If the hook is called before the contexte switch, it is more interesting
(for what i wan't to do: just trace the process switch):
- the hook will be called on every switch context (even if the preempted
thread is killed or never resumed)
- in the hook routine we can know wich thread has been preempted
(routine parameter) and the incoming one (with xnpod_current_thread().
Am i missing something? Isn't this modification interesting?
With best regards.
Christian
--
Gagneraud Christian
Atos Origin
Systems Integration
Rue Ampère - BP 475
31315 Labège Cedex
Tel : +33 (0)5.61.39.75.47
Fax : +33 (0)5.61.39.16.65
mailto: address@hidden
==========
Ce message électronique est confidentiel. Il peut contenir des
informations protégées par le secret professionnel, le secret de
fabrication ou autres règles légales. Si vous recevez ce message par
erreur, il vous est interdit de le reproduire ou de le distribuer en
tout ou partie, ou de le divulguer de quelque manière que ce soit a
quelque personne que ce soit.Nous vous prions de bien vouloir en
informer Atos Origin, par téléphone ou par retour d'e-mail puis de
détruire le message et toutes copies de votre système informatique...
Le contenu de ce message ne reflète pas necessairement ni les opinions
d'Atos Origin ni celles des membres de son groupe. Bien que l'émetteur
de ce message ait fait tout son possible pour maintenir son système
informatique sans virus, il ne peut garantir que cette transmission ne
comporte aucun virus et il ne pourra être tenu pour responsable de
quelque dommage que ce soit résultant de la transmission d'un virus.
-- ! --
This electronic transmission and any files attached to it are strictly
confidential and intended solely for the addressee. If you are not the
intended addressee, you must not disclose, copy or take any action in
reliance of this transmission. If you have received this transmission in
error, please notify us by return and delete the same.
The views expressed in this electronic transmission do not necessarily
reflect those of Atos Origin or any of its subsidiary companies.
Although the sender endeavours to maintain a computer virus free
network, the sender does not warrant that this transmission is
virus-free and will not be liable for any damages resulting from any
virus transmitted. Thank You.
==========
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Xenomai-main] thread switch hookl,
Christian GAGNERAUD <=