john skaller | 5 Nov 2008 08:29
Picon

resource subsumption

A problem arose some time ago, that some library code required async  
support (flx_arun driver),
and some needed SDL support (flx_sdl_run driver), and some needed both  
(say, flx_sdl_arun
driver).

The problem is of course that ordinary code needing async support  
can't know other code
needed SDL support .. but there is no way with a "target" based  
resource tree that
two independent resources requirements can be satisfied by one entity.

A related example: some code need library A, other code library B, and  
A and B require
each other. You'd like to make library A+B to avoid dynamic linkage  
overheads on
calls between these libraries (indeed you may get inlining of some  
calls).

But whilst a simple requires clause can expand to multiple  
requirements (virtual targets),
there's no way to *combine* requirements:

	Library A+B satisfies the need for both A and for B.

This is also what we need for the first case: a driver that supports  
both async and SDL.

A solution is to add a field:

(Continue reading)


Gmane