[lcdproc] dealing with multiple instances with .so

Andre Breiler andreb@rd.bbc.co.uk
Thu, 29 Mar 2001 12:40:37 +0100 (BST)


On Wed, 28 Mar 2001, Nathan Yawn wrote:

> James McCracken wrote:
> > 
> > >This is something left to be decided on. A driver will report its
> > name
> > >to LCDd -- if LCDd's already got a driver by that name, do we allow
> > 
> > Complexity is greatly minimized if we make drivers multi-screen
> > ignorant.  Plus, it just feels the right way to me.
> 

Ok, this is something with which most of us (all ?) agree.

> 	I agree, drivers should be ignorant of multiple screens.  If we use .so
> drivers (and I think we should,) then a driver won't report it's
> name...the information in the config file for a particular device will

I think it should report something like a predictable but unique ID so
we can use this ID somewhere (e.g. client communication) to select _this_
driver instance == physical display screen.

> tell LCDd which .so driver to load to drive just that particular

It will tell the lcdd which lib to load but not which device because only
the driver knows the meaning of this config option.

> device.  Function calls for that device will be made from the .so named
> in the config file.  These functions will need to be passed the data
> relavant to a particular device (serial device, screen size, etc) each
> time they are called.

Yes this is the normal lib handling. You get a lib handle (to use the
function of the lib) and a instance handle (where the private data is
stored like buffers ect.).
We shouldn't change this because it will break a lot of things.

Myebe I'm wrong but I think you havn't watched the thread close enough
because we talked about two things.
1) dynamic libs (the normal case) and the possible use of wrappers
2) tcp (or in general a distributed) driver wrapper and the need of IDs

> 	Thus, if a second device wants the same driver, it can just be "loaded"
> again (libdl for Linux and Sun will just return a pointer to the one
> already opened), and calls for the second device will be made from the
> same driver, just passed different parameters (different serial device,
> etc.)

Right the lib handle itself is constant but not the instance handle.

Bye Andre'
-- 
Andre' Breiler                       |   Tel: +44 1737 839532
BBC Internet Services                | Email: andre.breiler@rd.bbc.co.uk 
Kingswood Warren,Tadworth,Surrey,UK  |   URL: http://support.bbc.co.uk/
Mail me.  Don't phone if possible. And use a Subject line.



-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe@lists.omnipotent.net