Hello! I think I don't really undestand the matter of no-sender notifications in the GNU Mach device code.
All device glue codes (native Mach, Linux block and net and pcmcia) use the following code sequence to request a no-sender notification: #v+ /* * Request no-senders notifications on device port. */ notify = ipc_port_make_sonce(device->port); ip_lock(device->port); ipc_port_nsrequest(device->port, 1, notify, ¬ify); #v- (`device/ds_routines.c', `device_open', call to `ipc_port_nsrequest' as one example.) But then, in every emulation ops structure, the no-senders stuff is essentially disabled again. So, why are they doing this request in the first place? In `kern/ipc_kobject.c', `ipc_kobject_notify' we have... #v+ switch (ip_kotype(port)) { case IKOT_DEVICE: return ds_notify(request_header); #v- ... where `ds_notify' again is in defined `device/ds_routines.c' and essentially does the following: #v+ if (dev->emul_ops->no_senders) (*dev->emul_ops->no_senders) (ns); #v- ... where this `no_senders' is simply NULL for all Linux drivers or the following printf-noop-function for the Mach ones: #v+ /* * Doesn't do anything (yet). */ static void ds_no_senders(notification) mach_no_senders_notification_t *notification; { printf("ds_no_senders called! device_port=0x%x count=%d\n", notification->not_header.msgh_remote_port, notification->not_count); } #v- Do these no-sender notifications perhaps have some side effects somewhere that I'm not yet aware about? What also is strange is that in `device/conf.h''s `struct dev_ops' (which is used for the Mach-native drivers) there is an element `d_port_death' (to ``clean up reply ports'') which is also initialized in `i386/i386at/conf.c', to `kdportdeath' or `comportdeath', for example, but which will obviously never be called given the above `ds_no_senders'. How can all this be explained? Regards, Thomas
signature.asc
Description: Digital signature
_______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd