2 * Copyright (C) 2011-2012 ARM Limited. All rights reserved.
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12 * @file mali_osk_misc.c
13 * Implementation of the OS abstraction layer for the kernel device driver
15 #include <linux/kernel.h>
16 #include <asm/uaccess.h>
17 #include <asm/cacheflush.h>
18 #include <linux/sched.h>
19 #include <linux/module.h>
22 void _mali_osk_dbgmsg( const char *fmt, ... )
30 u32 _mali_osk_snprintf( char *buf, u32 size, const char *fmt, ... )
36 res = vscnprintf(buf, (size_t)size, fmt, args);
42 void _mali_osk_abort(void)
44 /* make a simple fault by dereferencing a NULL pointer */
49 void _mali_osk_break(void)
54 u32 _mali_osk_get_pid(void)
56 /* Thread group ID is the process ID on Linux */
57 return (u32)current->tgid;
60 u32 _mali_osk_get_tid(void)
62 /* pid is actually identifying the thread on Linux */
63 return (u32)current->pid;