summaryrefslogtreecommitdiff
path: root/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c')
-rw-r--r--drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c
index 3afd2da736c..106308b58ba 100644
--- a/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c
+++ b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_misc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
@@ -27,6 +27,18 @@ void _mali_osk_dbgmsg( const char *fmt, ... )
va_end(args);
}
+u32 _mali_osk_snprintf( char *buf, u32 size, const char *fmt, ... )
+{
+ int res;
+ va_list args;
+ va_start(args, fmt);
+
+ res = vsnprintf(buf, (size_t)size, fmt, args);
+
+ va_end(args);
+ return res;
+}
+
void _mali_osk_abort(void)
{
/* make a simple fault by dereferencing a NULL pointer */
@@ -49,3 +61,9 @@ u32 _mali_osk_get_tid(void)
/* pid is actually identifying the thread on Linux */
return (u32)current->pid;
}
+
+void * _mali_osk_get_task(void)
+{
+ return current;
+}
+