Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/lindaapi.h @ 603:42c94f85c779
long -> memaddr (64 or 32)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Nov 2009 14:13:29 +0900 |
parents | 1733f3cbfa28 |
children | 32a7260fad2f |
comparison
equal
deleted
inserted
replaced
602:1733f3cbfa28 | 603:42c94f85c779 |
---|---|
24 | 24 |
25 /*---------------------------------------------------------------------- | 25 /*---------------------------------------------------------------------- |
26 パケットフォーマット | 26 パケットフォーマット |
27 char short 8byte int | 27 char short 8byte int |
28 Mode + ID + Seq + Data_len + Padding + Data | 28 Mode + ID + Seq + Data_len + Padding + Data |
29 0 1 3 7+4 11+4 12+4 | 29 0 1 3 7 11 12 |
30 ----------------------------------------------------------------------*/ | 30 ----------------------------------------------------------------------*/ |
31 | 31 |
32 #define LINDA_MODE_OFFSET 0 | 32 #define LINDA_MODE_OFFSET 0 |
33 #define LINDA_ID_OFFSET 1 | 33 #define LINDA_ID_OFFSET 1 |
34 #define LINDA_SEQ_OFFSET 3 | 34 #define LINDA_SEQ_OFFSET 3 |
35 #define LINDA_DATA_LENGTH_OFFSET (7+4) | 35 #define LINDA_DATA_LENGTH_OFFSET 7 |
36 #define LINDA_HEADER_SIZE (12+4) | 36 #define LINDA_HEADER_SIZE 12 |
37 | 37 |
38 /*---------------------------------------------------------------------- | 38 /*---------------------------------------------------------------------- |
39 構造体定義 | 39 構造体定義 |
40 ----------------------------------------------------------------------*/ | 40 ----------------------------------------------------------------------*/ |
41 typedef struct psx_reply{ | 41 typedef struct psx_reply{ |
43 unsigned int seq; | 43 unsigned int seq; |
44 struct psx_reply *next; | 44 struct psx_reply *next; |
45 char mode; | 45 char mode; |
46 void(*callback)(unsigned char * tuple, void * obj); | 46 void(*callback)(unsigned char * tuple, void * obj); |
47 void * obj; | 47 void * obj; |
48 } REPLY; | 48 } REPLY, Reply, *ReplyPtr; |
49 | 49 |
50 typedef struct command_queue{ | 50 typedef struct command_queue{ |
51 struct command_queue *next; | 51 struct command_queue *next; |
52 unsigned int tspace_id; /* ID of destination Tuple Space */ | 52 unsigned int tspace_id; /* ID of destination Tuple Space */ |
53 unsigned int size; | 53 unsigned int size; |
73 extern unsigned int psx_get_seq(unsigned char *); | 73 extern unsigned int psx_get_seq(unsigned char *); |
74 extern unsigned short psx_get_id(unsigned char *); | 74 extern unsigned short psx_get_id(unsigned char *); |
75 extern unsigned char psx_get_mode(unsigned char *); | 75 extern unsigned char psx_get_mode(unsigned char *); |
76 extern unsigned char * psx_get_data(unsigned char *); | 76 extern unsigned char * psx_get_data(unsigned char *); |
77 | 77 |
78 extern long psx_out(unsigned int tspace_id, unsigned int id, | 78 extern int psx_out(unsigned int tspace_id, unsigned int id, |
79 unsigned char *data, unsigned int size); | 79 unsigned char *data, unsigned int size); |
80 extern long psx_ld(unsigned int tspace_id, unsigned int id, | 80 extern int psx_ld(unsigned int tspace_id, unsigned int id, |
81 char mode, void(*callback)(unsigned char *,void *),void * obj); | 81 char mode, void(*callback)(unsigned char *,void *),void * obj); |
82 | 82 |
83 #define psx_in(tid, id) psx_ld(tid, id, 'i', NULL, NULL) | 83 #define psx_in(tid, id) psx_ld(tid, id, 'i', NULL, NULL) |
84 #define psx_rd(tid, id) psx_ld(tid, id, 'r', NULL, NULL) | 84 #define psx_rd(tid, id) psx_ld(tid, id, 'r', NULL, NULL) |
85 #define psx_ck(tid, id) psx_ld(tid, id, 'c', NULL, NULL) | 85 #define psx_ck(tid, id) psx_ld(tid, id, 'c', NULL, NULL) |