You want 'mymodule' to use a different name to hal_init for each
distinct instance.  Furthermore, you want to use that component name in
the loadusr command, so that processing of hal commands doesn't continue
until the component has created all its pins.

Assuming that you want to use the 'keyword=value' style of argument
(you'll have to write the processing logic yourself, as userspace
components just get a regular argc/argv like any C program), this would
end up looking something like this:
    loadusr -Wn copy1 mymodule name1=copy1
    loadusr -Wn copy2 mymodule name2=copy2

int main(int argc, char **argv) {
    char *name = "mymodule"
    ... parse argv and find any name= and point the variable 'name' at it ..
    comp_id = hal_init(name);
    ...
}

Jeff

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to