OK, I've got the thing stabilized.
All the regressions I was aware of, are fixed.

Some Q&As:

Q: What does it do?
A: Nothing but to allow to sleep inside dosemu
code while the DOS code is still running (in another thread).

Q: Any synchronization issues?
A: Nope, cooperative threading is synchronous.

Q: What is it useful for?
A: The primary targets were fossil's wait for char, int16's wait
for keypress, and do_call_back(). I wasn't looking for more;
there are probably still the candidates available. And when
moving bios.S parts to C code, this is a very handy capability.

Q: So... only 3 users?
A: Well but do_call_back() is used in a lot of places, so a lot
of code now uses coopthreads indirectly.

Q: Is it clean?
A: It is clean because it is small (~11K of source), only uses
libpcl for coroutines and hlt.c to communicate with DOS code.
It is not clean because it has a few hooks in int.c; namely
do_int(), do_int_from_hlt() and a few other funcs were changed
with adding hooks. There is also an old do_call_back() code still
available for vga.c's legacy modeswitching; it is largely irrelevant
these days because of KMS, so I decided agains wasting my
time on it.
Overall I think it is fine. We have coopthreads_v1 to compare
to. It was intended to be fully self-contained and ended up in
an unmaintainable state. Adding a couple of hooks into int.c
should not be a big deal when the benefit is such a simple
and small implementation as mine certainly is. :)

Q: Why did it took so many time and changes to get the thing
to just work?
A: Because there were too many bugs and assumption in dosemu
code that I had to fix. Most of them were not directly related to
coopthreads, just uncovered by it, and are already merged to master.
I think not a single bug was found in coopth.c itself since the
very first commit of it.

Q: So, what are the plans?
A: To start threatening people with merging the thing to master:
caution advised!

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to