On Tue, Jan 02, 2001 at 12:18:05PM +0100, Petr Stehlik wrote: > > The main problem with that call is of course that it would not help at > > all when the user doesn't run a MiNT kernel that already supports it. > > I haven't read Draco's doc about MP friendly programming but I believe > it's not that hard to make new applications MP compatible. If your application only sends pointers to other applications: Not at all, it's just a matter of using the correct memory allocation flags (after checking that Mxalloc() accepts memory protection flags, the recommend method is to check whether Sysconf(-1) returns anything but ENOSYS). If your application also receives pointers from other applications and you want to be sure it doesn't get killed if another app sends a pointer to private memory, things are a bit more tricky. Currently, you have to install a signal handler for SIGBUS to catch memory violations and have it react accordingly. Guido's proposal would allow doing this using a simple kernel call, but of course that wouldn't help of the kernel in use doesn't already support it. In the latter case, you'd either have to implement the SIGBUS method as well, or risk your program crashing when used with older versions of MiNT and an ill-designed application (like ST-Guide) uses private memory for protocol communications. > The main problem is IMHO in those old applications that do not have > replacements yet and their source code is not available (ST-Guide has > been recently named as one of those problematic but widely used > programs). The proposed kernel call doesn't help them, does it? Nope. But it helps to set the memory protection flags of such offending programs to `readable' in most cases - sometimes you need `global', depending on what protocol messages they use. Ciao Thomas -- Thomas Binder (Gryf @ IRCNet) gryf@hrzpub.tu-darmstadt.de PGP-key available on request! binder@rbg.informatik.tu-darmstadt.de Vote against SPAM: http://www.politik-digital.de/spam/
Attachment:
pgpDWYidSG_HK.pgp
Description: PGP signature