[EMAIL PROTECTED] wrote:
> 
> In the below line of code, which file contains the definition of DRM(),
> and is it a macro , and if so what exactly does it do to the function alloc()
> ?
> 
> radeon_cp.c:            entry = DRM(alloc)( sizeof(drm_radeon_freelist_t),

The new templated architecture requires each driver to define DRM() in
the main foo.h file (eg. radeon.h, mga.h and so on).  One of the main
reasons is to allow multiple drivers to be compiled into the kernel,
with the DRM() macro giving each driver it's own copy (that can be
customized as needed) of the core DRM functions like the old-style
drm_alloc() in this case.  It also reduces to zero the amount of
code-sharing-by-cut-and-paste we used to see in the kernel modules, but
that's another story entirely.

-- Gareth

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to