1
/**********************************************************************
3
* Copyright (C) Imagination Technologies Ltd. All rights reserved.
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms and conditions of the GNU General Public License,
7
* version 2, as published by the Free Software Foundation.
9
* This program is distributed in the hope it will be useful but, except
10
* as otherwise stated in writing, without any warranty; without even the
11
* implied warranty of merchantability or fitness for a particular purpose.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along with
15
* this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18
* The full GNU General Public License is included in this distribution in
19
* the file called "COPYING".
21
* Contact Information:
22
* Imagination Technologies Ltd. <gpl-support@imgtec.com>
23
* Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
25
******************************************************************************/
27
#if !defined (__IMG_DEFS_H__)
28
#define __IMG_DEFS_H__
30
#include "img_types.h"
32
typedef enum img_tag_TriStateSwitch
38
} img_TriStateSwitch, * img_pTriStateSwitch;
44
#if defined (NO_INLINE_FUNCS)
48
#if defined (__cplusplus)
50
#define FORCE_INLINE inline
53
#define INLINE __inline
55
#define FORCE_INLINE static __inline
60
#ifndef PVR_UNREFERENCED_PARAMETER
61
#define PVR_UNREFERENCED_PARAMETER(param) (param) = (param)
65
#define unref__ __attribute__ ((unused))
70
#ifndef _TCHAR_DEFINED
72
typedef unsigned short TCHAR, *PTCHAR, *PTSTR;
74
typedef char TCHAR, *PTCHAR, *PTSTR;
76
#define _TCHAR_DEFINED
80
#if defined(__linux__) || defined(__METAG)
83
#define IMG_INTERNAL __attribute__((visibility("hidden")))
84
#define IMG_EXPORT __attribute__((visibility("default")))
86
#define IMG_RESTRICT __restrict__
89
#error("define an OS")
93
#define IMG_ABORT() abort()
97
#define IMG_MALLOC(A) malloc (A)
101
#define IMG_FREE(A) free (A)
104
#define IMG_CONST const
106
#if defined(__GNUC__)
107
#define IMG_FORMAT_PRINTF(x,y) __attribute__((format(printf,x,y)))
109
#define IMG_FORMAT_PRINTF(x,y)
112
#define CLEANUP_WITH_POLL IMG_FALSE
113
#define FORCE_CLEANUP IMG_TRUE
116
#define IMG_UNDEF (~0ULL)
118
#define IMG_UNDEF (~0UL)