[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface for SCSI transactions ?

From: Samuel Thibault
Subject: Re: Interface for SCSI transactions ?
Date: Mon, 12 Sep 2011 22:04:56 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Thomas Schmitt, le Fri 09 Sep 2011 12:08:39 +0200, a écrit :
> > It's actually very simple to define an RPC, it essentially looks
> > like a C function declaration, see ./include/device/device.defs
> > for the device_set_status RPC declaration for instance.
> Ahum ... i will have to design such a prototype.
> > routine device_set_status(
> >                 device          : device_t;
> >         in      flavor          : dev_flavor_t;
> >         in      status          : dev_status_t
> >         );      
> This gives me new questions.
> Language:
> Why no "in" or "out" before parameter "device" ?

See device_types.defs: device_t is the port to which the RPC is done.
ATM a kernel-served port, but it could be served by a userland

> How to say "in and out" ?

inout, apparently.

> Can you give me an URL where the language is documented ?

This is the mig language, you thus want the mig documentation:


> Naming conventions:
> How to name the function ?  device_transact_scsi() ?

It shouldn't include "scsi" since it could be useful to other
conditions. It's supposed to go along device_read, device_write,
device_set_status, device_get_status. device_transact could be an
option. As I'm not a native english speaker, I don't really have better

> Does that mean, that all instances of struct device_emulation_ops
> have to be augmented by a function pointer ?

Yes, although for all the structs which are not of interest to you, you
can simply put NULL there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]