comparison src/gpf3/frame/route.h @ 2:c41a534f33c6

src/gpf3: preened GPF goo from TCS3.2
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:52:50 +0000
parents
children
comparison
equal deleted inserted replaced
1:864b8cc0cf63 2:c41a534f33c6
1 /*
2 +-----------------------------------------------------------------------------
3 | File: route.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 : Type definitions and prototypes for routing.
17 +-----------------------------------------------------------------------------
18 */
19
20 #ifndef __ROUTE_H__
21 #define __ROUTE_H__
22
23 #define RT_DUPLICATE 0x01
24 #define RT_REDIRECT 0x02
25 #define RT_DESTROY 0x04
26 #define RT_COMMAND_MASK (RT_DUPLICATE|RT_REDIRECT|RT_DESTROY)
27
28 #define RT_CLEAR_ENTRY 0x10
29 #define RT_ALL_DESTINATION 0x20
30
31 typedef enum { RT_STORE = 1, RT_DELETE } RT_ENTRY;
32 typedef enum { RT_PRIMITIVE_TYPE = 1, RT_SIGNAL_TYPE, RT_TIMEOUT_TYPE } RT_MESSAGE_TYPE;
33
34 typedef struct _T_ROUTING_ENTRY
35 {
36 T_HANDLE SndTaskHandle; /* sender of a mesage */
37 T_HANDLE OldDestComHandle; /* original destination queue handle */
38 T_HANDLE OldDestTaskHandle;/* original destination task handle */
39 T_HANDLE NewDestComHandle; /* new destination queue handle */
40 RT_MESSAGE_TYPE MsgType; /* message type (primitive,timeout,signal) */
41 ULONG opcStatus; /* mask for messages to be routed */
42 ULONG opcMask; /* relevant bits in opcStatus */
43 int Command; /* redirect/duplicate */
44 char ExtDest[RESOURCE_NAMELEN];
45 struct _T_ROUTING_ENTRY * pNextEntry;
46 struct _T_ROUTING_ENTRY * pPrevEntry;
47 } T_FRM_ROUTING_TABLE_ENTRY;
48
49 #define RT_OK 0
50 #define RT_ERROR (-1)
51 #define RT_NO_MEM (-2)
52
53 #define ROUTE_ALL (T_HANDLE)0xFFFF
54
55 #define RT_CLEAR_TOKEN "CLEAR"
56 #define RT_ALL_TOKEN "ALL"
57
58 #define RT_SIGNAL_TOKEN "S"
59 #define RT_TIMEOUT_TOKEN "T"
60
61 GLOBAL SHORT rt_Init (void);
62 GLOBAL SHORT rt_RoutingModify ( T_HANDLE TaskHandle, char *Command, char *String);
63 GLOBAL SHORT rt_ConnectRoute ( T_HANDLE TaskHandle, char *Destination);
64 GLOBAL SHORT rt_DisconnectRoute ( T_HANDLE TaskHandle, char *Destination);
65 GLOBAL SHORT rt_Route ( T_HANDLE SndTaskHandle, T_HANDLE RcvComHandle, USHORT Prio, ULONG Suspend, OS_QDATA *Msg );
66 GLOBAL SHORT rt_RouteRead ( T_HANDLE TaskHandle, char *token );
67 GLOBAL void rt_ExtPrimitive ( T_HANDLE TaskHandle, T_HANDLE DestComHandle, T_HANDLE OrgDestComHandle, char *ExtDest, OS_QDATA *Msg ) ;
68 GLOBAL SHORT rt_isolate_entity ( T_HANDLE caller, char *entity );
69 GLOBAL int rt_desclist_to_sdu ( T_HANDLE caller, T_HANDLE dst, T_PRIM_HEADER *prim, T_PRIM_HEADER **sdu_prim );
70
71
72 #endif /* ROUTE_H */