Mercurial > hg > FederatedLinda
comparison src/fdl/FederatedLinda.java @ 23:b4fd7fb9135a
Simple Test run.
author | kono |
---|---|
date | Wed, 20 Aug 2008 03:28:45 +0900 (2008-08-19) |
parents | 56e015e8f5dc |
children | 35375016b2f0 |
comparison
equal
deleted
inserted
replaced
22:56e015e8f5dc | 23:b4fd7fb9135a |
---|---|
80 psx_queue (unsigned int tspace_id, unsigned int id, | 80 psx_queue (unsigned int tspace_id, unsigned int id, |
81 unsigned int size, unsigned char *data, char mode, | 81 unsigned int size, unsigned char *data, char mode, |
82 void(*callback)(char*,void*), void * obj): | 82 void(*callback)(char*,void*), void * obj): |
83 */ | 83 */ |
84 | 84 |
85 public PSXReply psx_queue(PSXLinda linda, int id, ByteBuffer s, int length, int mode, PSXCallback callback) { | 85 public PSXReply psx_queue(PSXLinda linda, int id, ByteBuffer s, int mode, PSXCallback callback) { |
86 PSXQueue c = new PSXQueue(linda,id,mode,s,length,callback); | 86 PSXQueue c = new PSXQueue(linda,id,mode,s,callback); |
87 | 87 |
88 if (q_top == null) { | 88 if (q_top == null) { |
89 c = q_end = q_top = c; | 89 c = q_end = q_top = c; |
90 } else { | 90 } else { |
91 q_end.next = c; | 91 q_end.next = c; |
98 p.seq = seq(p); | 98 p.seq = seq(p); |
99 c.setSeq(p.seq); | 99 c.setSeq(p.seq); |
100 if (debug) { | 100 if (debug) { |
101 System.out.print("Integer compare="); | 101 System.out.print("Integer compare="); |
102 System.out.println((new Integer(2)).equals(new Integer(2))); | 102 System.out.println((new Integer(2)).equals(new Integer(2))); |
103 System.out.print("Seding seq="); | 103 System.out.print("Sedning seq="); |
104 System.out.println(p.seq); | 104 System.out.println(p.seq); |
105 } | 105 } |
106 if (r_top == null){ | 106 if (r_top == null){ |
107 r_end = r_top = p; | 107 r_end = r_top = p; |
108 } else { | 108 } else { |
145 int key_num = 0; | 145 int key_num = 0; |
146 Set<SelectionKey> keys; | 146 Set<SelectionKey> keys; |
147 | 147 |
148 while (q_top != null){ | 148 while (q_top != null){ |
149 PSXQueue c = q_top; | 149 PSXQueue c = q_top; |
150 c.Send(); | 150 c.send(); |
151 q_top = c.next; | 151 q_top = c.next; |
152 // psx_free(c); | 152 // psx_free(c); |
153 // q_top = c = t; | 153 // q_top = c = t; |
154 qsize--; | 154 qsize--; |
155 } | 155 } |