comparison src/chain.h @ 215:726937936aa0

- CCC: added reentrancy control to the OpEnd and OpAbort operations. - CCC: enhanced the debug function and implemented OpAbort for dpi.
author jcid
date Sat, 17 May 2008 03:00:04 +0200
parents 6ee11bf9e3ea
children 3e784a367043
comparison
equal deleted inserted replaced
214:d34d08b9dfcb 215:726937936aa0
14 #define OpSend 2 14 #define OpSend 2
15 #define OpStop 3 15 #define OpStop 3
16 #define OpEnd 4 16 #define OpEnd 4
17 #define OpAbort 5 17 #define OpAbort 5
18 18
19 /*
20 * CCC flags
21 */
22 #define CCC_Stopped (1 << 0)
23 #define CCC_Ended (1 << 1)
24 #define CCC_Aborted (1 << 2)
19 25
20 /* 26 /*
21 * Linking direction 27 * Linking direction
22 */ 28 */
23 #define FWD 1 29 #define FWD 1
30 void *Data1, void *Data2); 36 void *Data1, void *Data2);
31 37
32 /* This is the main data structure for CCC nodes */ 38 /* This is the main data structure for CCC nodes */
33 struct _ChainLink { 39 struct _ChainLink {
34 void *LocalKey; 40 void *LocalKey;
41
42 int Flags;
35 43
36 ChainLink *FcbInfo; 44 ChainLink *FcbInfo;
37 ChainFunction_t Fcb; 45 ChainFunction_t Fcb;
38 int FcbBranch; 46 int FcbBranch;
39 47
59 int Direction, ChainFunction_t BFunc, 67 int Direction, ChainFunction_t BFunc,
60 int AtoB_branch, int BtoA_branch); 68 int AtoB_branch, int BtoA_branch);
61 void a_Chain_unlink(ChainLink *Info, int Direction); 69 void a_Chain_unlink(ChainLink *Info, int Direction);
62 int a_Chain_fcb(int Op, ChainLink *Info, void *Data1, void *Data2); 70 int a_Chain_fcb(int Op, ChainLink *Info, void *Data1, void *Data2);
63 int a_Chain_bcb(int Op, ChainLink *Info, void *Data1, void *Data2); 71 int a_Chain_bcb(int Op, ChainLink *Info, void *Data1, void *Data2);
72 int a_Chain_check(char *FuncStr, int Op, int Branch, int Dir,
73 ChainLink *Info);
64 74
65 DataBuf *a_Chain_dbuf_new(void *buf, int size, int code); 75 DataBuf *a_Chain_dbuf_new(void *buf, int size, int code);
66 void a_Chain_debug_msg(char *FuncStr, int Op, int Branch, int Dir);
67
68 76
69 #endif /* __CHAIN_H__ */ 77 #endif /* __CHAIN_H__ */