Mail Archives: djgpp/1996/12/21/20:33:56
take a look at lwp0.7, which implements [very] light weight threads... you
should find what you're looking for in the source code.
jdm
disclaimer: i haven't used lwp; i just browsed the source... can't even
tell you for sure how well, or whether, it works! :)
--
//// jean-david marrow
//// pachyderm software
//// pachydrm AT ix DOT netcom DOT com
Jurgen Schwietering <tweety AT Torino DOT ALPcom DOT it> wrote in article
<591pu6$1mv AT galileo DOT polito DOT it>...
| Someone who likes hardware interrupts and multitasking?
|
[...]
| I install a handler at interrupt 0x08 (timer) which will chain also to
the
| old routine. The routine will count (millseconds resolution) a certain
| amount of ticks and when necessary call a function which will invoke a
| part of the code bye manipulating the stack. So the timer will continue
to
| count and the routine will do what it needs to do (setting up an
| apropriate semaphore and some longer stuff using serial port). When this
| routine finishes it will restore th values of the interrupted
| programme (stack, registers) manipulating the return stack and finally
| doing the ret. During the execution of the secondary routine may
| occure other timer interrupts (and they will occur) so a semaphore will
| tell the timer to return immediatly to the interrupted routine (which
will
| be in that moment the secondary routine).
[...]
| So this is my question: how can handle all this with the dpmi ifc? Any
| sample code under djgpp doing something similar (multitasing kernels do
| quite the same)?
|
| Thank you for your attention
| Jurgen
|
|
- Raw text -