Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

threads implementation

0 views
Skip to first unread message

highland

unread,
Mar 28, 2003, 12:16:10 PM3/28/03
to
Hello
I wanted to write simple program swithing between threads.
My threads are simple functions.
I created itimerval timer, which sends SIGVTALRM every 100ms.
In my timer_handler() procedure i would like to choose
aprioprate thread to continue. My problem is:
How does stack looks like when thread (my function) is interrupted by
SIGVTALRM ? What information should i save, and how can i back to
selected thread in timer_handler() ?
Do you know some good web pages/HOWTO about it ?

Thanx for any help
Michal

Kasper Dupont

unread,
Mar 28, 2003, 4:04:52 PM3/28/03
to

Maybe you can find some inspiration in this code:
http://www.daimi.au.dk/~kasperd/scheduler.c

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);

0 new messages