[nos-bbs] NOS, CYGWIN, WIN32, DJGPP, and future porting issues ...

Maiko Langelaar (ve4klm) maiko at pcs.mb.ca
Fri Sep 15 11:38:52 EDT 2006


Hi Bill,

> Is this Context technology a part of C ...

Yes, here's a random website for complete technical details :

   http://bama.ua.edu/cgi-bin/man-cgi?makecontext+3C

> or is it something built in to JNOS.

It's used by JNOS and other software to "implement user level context
switching between multiple threads of control with the process".

You will read all over the place that BETTER control can be obtained
by using native O/S support for multithreading (threads).

> Is that the main reason we can't run JNOS under Microsoft C++ ?

I can't say what the *main reason* is, but that's one of them.

> If it's a technology like "threads", how was JNOS converted to LINUX ?

JNOS always dealt with it's own *threads*, regardless of whether it
ran on DOS or LINUX. It used the JMPBUF mechanisms available in both
the DOS Borland stuff and Linux distributions to do so.

For FC 5 and similar systems, the JMPBUF mechanisms are hidden to the 
point we can't really use them anymore. An alternative to JMPBUF is the
UCONTEXT (user context) stuff. Believe it or not, *someone* had ported
JNOS to Solaris UNIX at one time (or they tried anyways by looking at
the code). The ucontext stuff I believe is originally from Unix days.

You can think of UCONTEXT as an advanced version of the JMPBUF stuff.

Seeing the Solaris code, I played around, and sure enough the UCONTEXT
stuff *seems* to work for the FC 5 distribution. But UCONTEXT has also
been labeled as *obsolete* by some organizations, so logically the next
step in the JNOS evolution is to move to using native O/S threads, but
right now I'm not ready to do that. I need to think about all of this.

> It seems Phil designed his own modules when he converted NET to DJGPP

Nope. The DJGPP version of Phil's KA9Q NOS still uses JMPBUF, and as a
matter of fact, if Phil has a DJGPP version, it means that technically
we can come up with a JNOS version just the same. I'm not saying I'm
going to do it or not. It's just an observation that I make.

Maiko Langelaar / VE4KLM





More information about the nos-bbs mailing list