From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 10 Sep 1997 10:53:28 +0200 From: Jan Hubicka hubicka@horac.ta.jcu.cz Subject: [9fans] Porting XaoS (saga continues) Topicbox-Message-UUID: 6209d066-eac8-11e9-9e20-41e7f4b1d025 Content-Type: text/plain; charset=UTF-8 Message-ID: <19970910085328._Ts-f-4Ck8GLcI1vaYW8my0qulu-_tetr0zKvNlqKm0@z> On Tue, Sep 09, 1997 at 07:39:39AM +0000, forsyth@caldo.demon.co.uk wrote: > see /sys/src/cmd/disk/kfs/libp/port/qlock.c and related > files for a user-level QLock and RWLockimplementation. you should Opps. I have just demo installation so I can't read sources :( I really want to see them, but I am poor student and $120 is too much for me :( > be able to implementat what you need with that. note too that > sleep(0) will relinquish the CPU. see /sys/src/cmd/exportfs > and /sys/src/cmd/telco for other examples of multi-process > servers and different approaches to synchronisation. > you'll also find a concurrency-safe version of > malloc.c in at least one of those directories. > > most new concurrent programs in Plan 9 are (best) > written in Alef, so not much effort has gone into providing I am sorry, but I don't plan to rewrite XaoS into alef, since I want to keep portability with other OSes too. > a complete programming package for the venerable C. > > one point that's easy to overlook is that fork(2) notes that rfork(RFPROC|RFMEM) > causes ALL subsequent forks to share data. consequently, you need to ensure that > einit(...) is called to initialise the graphics event code before you do > the first RFMEM rfork, otherwise things can get a little bit confused. Ok. Need I do that in case other tasks don't access graphics too? (Linux requires the opposite so it would require one extra ifdef, wich is always ugly... :( ) > > as to the second question, i'm afraid that Plan 9 graphics supports only > up to 8 bits (0 <= Bitmap.ldepth <= 3). it's not just 8½; it would require > a fair amount of effort to change. OK no problem :) So XaoS now supports all modes supported by 8 1/2 - 1boo and 8 bpp :) Yesterday I implemented dithering, so XaoS should emulate truecolor.. Honza -- ------------------------------------------------------------------------------ Have you browsed my www pages? Look at: http://www.paru.cas.cz/~hubicka Koules-the game for Svgalib,X11 and OS/2, Xonix-the game for X11 czech documentation for linux index, original 2D computer art and funny 100 years old photos and articles are there!