[v2,2/5] drm: Add private data field to trace control block
diff mbox

Message ID 1434616965-5157-3-git-send-email-patrik.jakobsson@linux.intel.com
State New
Headers show

Commit Message

Patrik Jakobsson June 18, 2015, 8:42 a.m. UTC
This field can be used by the decode functions of a syscall. The main
usecase for now is to allow storing the driver name for drm devices
across the lifetime of a trace control block. This allows us to do the
driver identification once and reuse the information in all the decode
stages of the ioctl.

* defs.h: Add private data field in struct tcb

Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
---
 defs.h | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox

diff --git a/defs.h b/defs.h
index c02f810..5b0670e 100644
--- a/defs.h
+++ b/defs.h
@@ -266,6 +266,13 @@  struct tcb {
 	int u_error;		/* Error code */
 	long scno;		/* System call number */
 	long u_arg[MAX_ARGS];	/* System call arguments */
+
+	/*
+	 * Private data for the decoding functions of the syscall. TCB core does
+	 * _not_ handle allocation / deallocation of this data.
+	 */
+	void *priv_data;
+
 #if defined(LINUX_MIPSN32) || defined(X32)
 	long long ext_arg[MAX_ARGS];
 	long long u_lrval;	/* long long return value */