[Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

Dmitry V. Levin ldv at altlinux.org
Sun Jun 14 14:56:20 PDT 2015


On Sun, Jun 14, 2015 at 01:12:45PM +0200, Patrik Jakobsson wrote:
[...]
> How about adding a "void *private" field to struct tcb. That way any
> syscall can store additional data across the life of the tcb.

We can add a field to struct tcb, but its semantics wrt memory management
should be strictly defined.  For example, who is responsible for memory
deallocation, what droptcb() should do about this field, etc.

In this case, we probably need to store a pointer to a string dynamically
allocated in drm_get_driver_name() (on entering syscall) which is
automatically deallocated later in trace_syscall_exiting() and droptcb().


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20150615/e119329e/attachment.sig>


More information about the Intel-gfx mailing list