From owner-freebsd-hackers Mon Sep 8 18:44:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA23191 for hackers-outgoing; Mon, 8 Sep 1997 18:44:04 -0700 (PDT) Received: from wong.rogerswave.ca (wong.rogerswave.ca [204.92.17.32]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA23113 for ; Mon, 8 Sep 1997 18:43:47 -0700 (PDT) Received: (from wong@localhost) by wong.rogerswave.ca (8.8.7/8.7.3) id UAA00416; Mon, 8 Sep 1997 20:41:25 -0400 (EDT) Date: Mon, 8 Sep 1997 20:41:22 -0400 (EDT) From: Ken Wong X-Sender: wong@wong.rogerswave.ca Reply-To: wong@rogerswave.ca To: "Kevin P. Neal" cc: Terry Lambert , freebsd-hackers@FreeBSD.ORG Subject: Re: Divert sockets.. In-Reply-To: <1.5.4.32.19970907223328.008be880@mail.mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 7 Sep 1997, Kevin P. Neal wrote: > Well, the Amiga OS had a system for message transferral. You would set > up a message port. Do stuff. Then when you have nothing to do you sleep, > waiting on a signal. > > When you get a signal (because you got a message at one of your message > ports) then you wake up and check the message. > > The GUI notified you of events via just this messaging scheme. ARexx > programs could direct you to do stuff through another message port. This was > so common that most programs main loop's were just a simple > > Wait() > > Get Message() > > Copy Data Out of message > > Reply Message() > > Do Stuff() > > Loop back to Wait(). > > The File Notification scheme (useful for Terry's file browser) may have used > this messaging scheme as well (I honestly don't remember). You certainly > could be notified of disk change events (floppy insert/removal, later > removable HD change) through messages. > > Now, here's the question: How difficult would it be to do something like this? > It would take some sort of shared memory or other scheme to get the data from > one program to another. Or would that be too general? How about just a scheme > to get messages to and from the kernel? I have a kernel patch do just that. actually, it applys to alot of OS; QNX, Tandem Non-Stop Kernel, Minix. I don't know how if possible to include/commit it in the kernel tree. anyhow, If you are interested, I can send you the files. it is basically can do the following: prog A: main() { while(1) { pid = receive(pid-mask, buf); // blocked ... reply(pid, buf); } } prog B: main() { send(pid, buf); // blocked }