FreeCalypso > hg > fc-tourmaline
comparison src/gpf/inc/pei.h @ 0:4e78acac3d88
src/{condat,cs,gpf,nucleus}: import from Selenite
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Fri, 16 Oct 2020 06:23:26 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4e78acac3d88 |
|---|---|
| 1 /* | |
| 2 +------------------------------------------------------------------------------ | |
| 3 | File: pei.h | |
| 4 +------------------------------------------------------------------------------ | |
| 5 | Copyright 2002 Texas Instruments Berlin, AG | |
| 6 | All rights reserved. | |
| 7 | | |
| 8 | This file is confidential and a trade secret of Texas | |
| 9 | Instruments Berlin, AG | |
| 10 | The receipt of or possession of this file does not convey | |
| 11 | any rights to reproduce or disclose its contents or to | |
| 12 | manufacture, use, or sell anything it may describe, in | |
| 13 | whole, or in part, without the specific written consent of | |
| 14 | Texas Instruments Berlin, AG. | |
| 15 +----------------------------------------------------------------------------- | |
| 16 | Purpose : Protocol Entity Interface exported definitions. | |
| 17 +----------------------------------------------------------------------------- | |
| 18 */ | |
| 19 | |
| 20 | |
| 21 #ifndef __PEI_H__ | |
| 22 #define __PEI_H__ | |
| 23 | |
| 24 /*==== INCLUDES ============================================================*/ | |
| 25 | |
| 26 #include <stddef.h> | |
| 27 | |
| 28 /*==== CONSTANTS ===========================================================*/ | |
| 29 | |
| 30 #define PEI_OK 0 | |
| 31 #define PEI_ERROR (-1) | |
| 32 | |
| 33 /*==== TYPES ===============================================================*/ | |
| 34 | |
| 35 typedef int T_PEI_RETURN; | |
| 36 typedef char * T_PEI_CONFIG; | |
| 37 typedef void T_PEI_MONITOR; | |
| 38 | |
| 39 /* | |
| 40 * types and macros for pei-jumptable processing | |
| 41 */ | |
| 42 | |
| 43 #define PALLOC_TRANSITION /* to reinsert the sdu pointer in pei_primitive */ | |
| 44 #define NO_COPY_ROUTING /* has to be set for frame version > 2.5.0 */ | |
| 45 | |
| 46 /* | |
| 47 * for definitions of jumptables | |
| 48 */ | |
| 49 typedef void (*T_VOID_FUNC)(); | |
| 50 typedef short (*T_SHORT_FUNC)(); | |
| 51 | |
| 52 typedef struct { T_VOID_FUNC func; size_t size; size_t soff; ULONG opc; } T_FUNC; | |
| 53 #define MAK_FUNC_S(FUNC,OPC) { (T_VOID_FUNC)FUNC, sizeof(T_##OPC), offsetof(T_##OPC,sdu), OPC } | |
| 54 #define MAK_FUNC_0(FUNC,OPC) { (T_VOID_FUNC)FUNC, sizeof(T_##OPC), 0 , OPC } | |
| 55 #define MAK_FUNC_N(FUNC,OPC) { (T_VOID_FUNC)FUNC, 0 , 0 , 0 } | |
| 56 | |
| 57 #define TAB_SIZE(T) (sizeof T / sizeof *T) | |
| 58 | |
| 59 typedef struct | |
| 60 { | |
| 61 SHORT (*pei_init)(T_HANDLE); | |
| 62 SHORT (*pei_exit)(void); | |
| 63 SHORT (*pei_primitive)(void*); | |
| 64 SHORT (*pei_timeout)(USHORT); | |
| 65 SHORT (*pei_signal)(ULONG,void*); | |
| 66 SHORT (*pei_run)(T_HANDLE,T_HANDLE); | |
| 67 SHORT (*pei_config)(char*); | |
| 68 SHORT (*pei_monitor)(void**); | |
| 69 } T_PEI_FUNC; | |
| 70 | |
| 71 | |
| 72 typedef struct | |
| 73 { | |
| 74 char const *Name; | |
| 75 T_PEI_FUNC PeiTable; | |
| 76 ULONG StackSize; | |
| 77 USHORT QueueEntries; | |
| 78 USHORT Priority; | |
| 79 USHORT NumOfTimers; | |
| 80 U32 Flags; | |
| 81 } T_PEI_INFO; | |
| 82 | |
| 83 | |
| 84 #endif /* __PEI_H__ */ | |
| 85 |
