4
* Interface implemented by all multiprocessor gates.
6
* Copyright (C) 2008-2009 Texas Instruments, Inc.
8
* This package is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License version 2 as
10
* published by the Free Software Foundation.
12
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
19
#ifndef _IGATEMPSUPPORT_H_
20
#define _IGATEMPSUPPORT_H_
24
#define IGATEMPSUPPORT_NULL (void *)0xFFFFFFFF
26
/* Gates with this "quality" may cause the calling thread to block;
27
* i.e., suspend execution until another thread leaves the gate. */
28
#define IGATEMPSUPPORT_Q_BLOCKING 1
30
/* Gates with this "quality" allow other threads to preempt the thread
31
* that has already entered the gate. */
32
#define IGATEMPSUPPORT_Q_PREEMPTING 2
34
/* Object embedded in other Gate modules. (Inheritance) */
35
#define IGATEMPSUPPORT_SUPERPARAMS \
41
/* All other GateMP modules inherit this. */
42
#define IGATEMPSUPPORT_INHERIT(X) \
43
enum X##_local_protect { \
44
X##_LOCALPROTECT_NONE = 0, \
45
X##_LOCALPROTECT_INTERRUPT = 1, \
46
X##_LOCALPROTECT_TASKLET = 2, \
47
X##_LOCALPROTECT_THREAD = 3, \
48
X##_LOCALPROTECT_PROCESS = 4 \
51
/* Paramter initializer. */
52
#define IGATEMPSUPPORT_PARAMSINTIALIZER(x) \
54
(x)->resource_id = 0; \
55
(x)->open_flag = true; \
57
(x)->shared_addr = NULL; \
60
enum igatempsupport_local_protect {
61
IGATEMPSUPPORT_LOCALPROTECT_NONE = 0,
62
IGATEMPSUPPORT_LOCALPROTECT_INTERRUPT = 1,
63
IGATEMPSUPPORT_LOCALPROTECT_TASKLET = 2,
64
IGATEMPSUPPORT_LOCALPROTECT_THREAD = 3,
65
IGATEMPSUPPORT_LOCALPROTECT_PROCESS = 4
68
struct igatempsupport_params {
76
#endif /* ifndef __IGATEMPSUPPORT_H__ */