[GRASS5] Volunteer wanted for CELL driver color problem

Glynn Clements glynn.clements at virgin.net
Fri Apr 20 01:06:10 EDT 2001


Markus Neteler wrote:

>  -> I had included your proposed "sleep(1)" in d.mon/cmd/main.c
> 
> Probably we should distinguish between CELL start (with sleep) and XDRIVER
> start (without sleep). I have a 1GHz Athlon board here.
> 
> However, I think Glynn is looking into this as well now for a cleanup.

I've discovered why XDRIVER doesn't exhibit the same problems as CELL
(and presumably the others) w.r.t. timing.

"d.mon" first starts the monitor with system("mon.start"), which won't
return until mon.start returns. mon.start doesn't fork, but finishes
by exec()ing the driver. The net effect is that the system() call
won't return until the driver fork()s into the background (if you run
the monitor in the foreground, "d.mon start" won't finish until the
monitor terminates).

In XDRIVER's SWITCHER.c, the fork() doesn't occur until very shortly
before the main loop starts, while the one in driverlib fork()s
earlier. In particular, the fork() in driverlib occurs before
Graph_Set() and Color_table_fixed(), whilst in XDRIVER it occurs
afterwards.

For the new version, I'll follow XDRIVER regarding the location of the
fork().

Merging the FIFO and socket versions of connect.c and SWITCHER.c
turned out to be pretty straightforward. Merging the (merged)
driverlib and XDRIVER versions of SWITCHER.c seems a bit more
involved; the main issues being:

a) one of them has been re-formatted to someone's preferred style, so
I've had to re-format them back to a common style in order to get
diffs with a reasonable signal-to-noise ratio.

b) driverlib's main loop is driven by a single input source (the
socket/FIFOs), while XDRIVER also has to multiplex input from the X
connection.

c) XDRIVER takes an extra parameter ("nlev"); this is fairly trivial,
except that the socket/FIFO versions already have different invocation
conventions (FIFO takes the pathnames as an extra argument, socket
deduces them from the monitor name).

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list