Bonjour Eric!

Thank you very much for your explanations, I'm a bit more brightens. :)

But I think that I not explained the conditions, it's not explicitely "Task 
switcher for FreeDos" but more "Task Switcher for internal threads/functions" / 
"Stack switcher" or "Context switcher" In my .exe program directly.

During more years, i used Pthead or LWC for DJGPP, but his task manager is 
cooperative. "yelding" all loops is very dirty, and not serious for our 
project. And I want that my DOS exe program can switch his task (current stack 
pointer) by timer handler managed by IRQ0 with 0x08 vector (Or 0x09 for switch 
manually with keyboard). Mutexs and seamphores are not a problem ;).

I've tested more Borland C 16bits programs online source code for switch tasks 
between functions with « while(1); » under FreeDos this works.!

I must to use GCC / G++ / DJGPP for DOS, I started to write my task switching 
(for internal function) and I've some difficulties :/

In my ZIP in my first post, I have a good beginning, I can create tasks with 
his stack memory and stask pointer location and a task pool array. (After i 
will include priorities etc..)
I've toto() and tata() functions, he blocks to toto() with while(1); it's 
normal.
My Task switcher must to interrupt this current loop in toto() task, saving his 
registers, switching this current stack pointer with the new stack pointer 
tata(), pop his registers and continue..

It's just this part that I despair :( 
I'm sure that i forgot c++/asm steps! ) I've "task switcher documentation" but 
I blocking, if you can help me .. :/

Regards
Sébastien FAVIER
                                          
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to