Commit 14e84ec4 authored by Aftab Hussain's avatar Aftab Hussain
Browse files

more attribute info in for foobar idl

parent a0069e3c
//For the following,
// > caller fns are in the driver (the dummy foobar module - dummy.c)
// > callee fns are in the foobar subsystem (the dummy subsystem that registers the module - dev.c)
//For the following,
// > caller fns are in the driver (the dummy foobar module - dummy.c)
// > callee fns are in the foobar subsystem (the dummy subsystem that registers the module - dev.c)
module foobar() {
projection <struct foobar_device> foobar_device {
// attribute info for features field:
//in - features undergoes a read in callee register_foobar (need caller to callee marshalling)
//out - features undergoes a write in caller register_foobar (need callee to caller marshalling)
// attribute info for `features' field:
//[in] - features undergoes a read in callee `register_foobar' (need caller to callee marshalling)
//[ou]t - features undergoes a write in caller `register_foobar' (need callee to caller marshalling)
unsigned long [in,out] features;
unsigned long [in,out] hw_features;
unsigned long [out] wanted_features;
unsigned int flags;
// attribute & keyword info for `foobar_device_ops' field:
// `projection' - Since `foobar_device_ops' is a structure, it also needs to be accompanied with the
// `projection' keyword.
// [alloc(callee)] - Also, it would need to be allocated in the callee side, because it is being read in the callee side.
projection foobar_device_ops [alloc(callee)] *foobar_device_ops;
}
projection <struct foobar_device_ops> foobar_device_ops {
//here we have the projections for foobar_device_ops's fields. Since these
//fields are function pointers, which the dummy device registers with the kernel subsystem
// we have the rpc keyword accompanying the projection definitions of these function pointers. The directions are [in] since we are registering functions from the callee side
//to the caller side.
rpc [in] int (*init)(projection foobar_device *dev);
rpc [in] void (*uninit)(projection foobar_device *dev);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment