Driver Learner wrote:
Let’s say if I have array of similar resources (for convenience,
assume four same sized memory blobs) and the driver only maintains
which consumer uses which resource and gates access to other
resources. Apart from this, there is no other functionality needed.The list of APIs will be say,
GetResource(consumerId) - returns a resource id
AccessResource(consumerId, resourceId)
PutResource(consumerId, resourceId).I was trying to check if this simple functionality can be achieved by
using simple shared library.
There’s no need to make this complicated. You can do this all with a
simple static library – or even macros – and avoid the complications
of DLL management. It doesn’t make any difference whether the code
exists one time or four times, you will still need to use a single
shared lock to manage your resource. You can do that without having the
code in a common spot.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.