Path: utzoo!mnetor!uunet!husc6!mit-eddie!killer!tness1!nuchat!peter From: peter@nuchat.UUCP (Peter da Silva) Newsgroups: comp.sys.amiga Subject: Re: IPC - A proposal Message-ID: <742@nuchat.UUCP> Date: 7 Mar 88 12:27:55 GMT References: <5375@well.UUCP> Organization: Public Access - Houston, Tx Lines: 55 Points: (1) The magic_id should be just plain 'IPC ' for generic messages. This is more along the lines of IFF. For messages specific to a particular application this should be a unique application ID. (2) The size feild is redundant... it's a copy of a field in the message structure. (3) I don't think the byte-stream model is necessary. Messages can and do contain pointers, locks (which are pointers), strings (which are pointers), seglists (which are more pointers), and so on. There's no reason to ignore shared memory. For example: struct Browser { struct Message b_message; ULONG b_unique; ULONG b_id; union { struct { char *b_fname; ULONG b_dlock; } b_file; struct { struct Window *b_window; struct MsgPort *b_port; } b_win; struct { char *b_title; struct MsgPort *b_port; } b_menu; } b_u; }; #define B_UNIQUE 'BRWS' /* Unique ID for browser */ #define B_ADDFILE 'ADDF' /* I just created this file */ #define B_DELFILE 'DELF' /* I just deleted this file */ #define B_ADDTOOL 'ADDT' /* Add me to the tool menu */ #define B_DELTOOL 'DELT' /* I'm exiting, remove me from the menu */ #define B_ADDWIN 'ADDW' /* Add this window to the "copy" list */ #define B_DELWIN 'DELW' /* I'm about to close this window, delete it */ The message ports might be redundant... I *could* just use the reply ports for that purpose. I don't think that's quite in keeping with the spirit of the thing, though. The semantics of this should be obvious, but if they're not... let me know. And don't forget to flame :->. -- -- a clone of Peter (have you hugged your wolf today) da Silva `-_-' -- normally ...!hoptoad!academ!uhnix1!sugar!peter U -- Disclaimer: These aren't mere opinions... these are *values*.