On Mon, Jan 01, 2007 at 11:49:54AM +0100, Samuel Thibault wrote: > Ok, and how these two views may coexist? As I showed, they _are_ mixed > in the case of the linux block device glue for instance: > linux/dev/glue/block.c:device_open(): > > bd->device.emul_data = bd; > bd->device.emul_ops = &linux_block_emulation_ops; > ... > bd->port = ipc_port_alloc_kernel (); > ... > notify = ipc_port_make_sonce (bd->port); > ip_lock (bd->port); > ipc_port_nsrequest (bd->port, 1, notify, ¬ify); > > > So here it's really a plain IPC port that is used (and it's the same in > the plain device/ds_routines.c, linux net glue and pcmcia glue), while > on the other end: i386/i386at/i386at_ds_routines.c > > dev = (device_t) ns->not_header.msgh_remote_port; > > How can this work? (I currently have a kernel fault here)
I guess it's because the device_t type is defined to something else
for i386 devices :
i386/i386at/dev_hdr.h:
/* This structure is associated with each open device port.
The port representing the device points to this structure. */
struct device
{
struct device_emulation_ops *emul_ops;
void *emul_data;
};
typedef struct device *device_t;
--
Richard Braun
signature.asc
Description: Digital signature
_______________________________________________ Bug-hurd mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-hurd
