Message #9 Posted by Eric Smith on 12 May 2005, 8:56 p.m.,
in response to message #7 by Jonathan Purvis (New Zealand)
By the way, part of the purpose of some of the recent internal changes in Nonpareil has been an attempt to make it easier to port to other platforms. I'd definitely like to encourage a PalmOS port.
For most ports, the GUI code (csim.c) should just be thrown away, and not used for anything but a model.
On platforms that support multithreading, I recommend using it. All of the thread-aware code is in the single source file proc.c. It uses the threading and asynchronous queue primitives from glib, but it doesn't use very many of them, and doesn't do anything too exotic. The porting approach I suggest, for target platforms that aren't supported by glib, is to write equivalents to those routines.
For platforms that only support a single thread, the porting will be a bit more complex. I need to give a bit more thought to it. The naive approach would probably be to do away with proc.c entirely, but perhaps it would be better for me to put a bit of effort into cleaning up things to more easily fit into a single-threaded model.
Part of such a cleanup is already planned. I want to split proc.c into two separate source files, based on which thread the functions run in. A new header file will be created to document the message-passing interface between the two threads (currently at the top of proc.c).
Where possible, I'd like to integrate ports to other platforms like PalmOS or MacOS X into the standard Nonpareil distribution.