Rene W. Olsen wrote:
I have been thinking about the sharing msgport and signal that is used in the open device and I dont really think its a good idea to share.. but where do I store the allocated stuff ?
You cannot easily share a signal between openers because the signal is task-specific, i.e. if you open from two different tasks then this will not work at all, not even if both tasks use the same signal bit because you cannot have a message port owned by two tasks.
Can I clone the libray base and return a clone to the user every time open lib is called?
It might be a better idea to have a "server process" that does the device handling, and communicate via messages with any opener. If you need to have opener-specific data, it might also be a better idea to do this in the interface instead of the library base - this is directly supported by the system and not as hacky in nature as cloning a library base.
Regards,