75 |
Pistachio Patch |
Pistachio Patch |
76 |
--------------- |
--------------- |
77 |
|
|
78 |
The following patch fixes a problem with IPC propagation. |
The following patch fixes a problem with IPC propagation and with |
79 |
|
receiving from any local thread. |
80 |
|
|
81 |
|
2004-10-28 Marcus Brinkmann <marcus@gnu.org> |
82 |
|
|
83 |
|
* src/api/v4/ipc.cc (SYS_IPC): If receiving from any local |
84 |
|
thread, look up the first sending local thread. |
85 |
|
|
86 |
2004-10-23 Marcus Brinkmann <marcus@gnu.org> |
2004-10-23 Marcus Brinkmann <marcus@gnu.org> |
87 |
|
|
117 |
!to_tcb->get_partner().is_anythread() && |
!to_tcb->get_partner().is_anythread() && |
118 |
!( to_tcb->get_partner().is_anylocalthread() && |
!( to_tcb->get_partner().is_anylocalthread() && |
119 |
to_tcb->get_space() == current->get_space() ) ) )) |
to_tcb->get_space() == current->get_space() ) ) )) |
120 |
|
@@ -517,9 +520,24 @@ SYS_IPC (threadid_t to_tid, threadid_t f |
121 |
|
} |
122 |
|
} |
123 |
|
else |
124 |
|
- { /* anylocal */ |
125 |
|
-#warning wait_local incorrect |
126 |
|
- from_tcb = current->send_head; |
127 |
|
+ { |
128 |
|
+ /* anylocal */ |
129 |
|
+ |
130 |
|
+ tcb_t *head = current->send_head; |
131 |
|
+ from_tcb = NULL; |
132 |
|
+ |
133 |
|
+ if (head) |
134 |
|
+ { |
135 |
|
+ tcb_t *tcb = head; |
136 |
|
+ |
137 |
|
+ do |
138 |
|
+ { |
139 |
|
+ if (tcb->get_space () == current->get_space ()) |
140 |
|
+ from_tcb = tcb; |
141 |
|
+ tcb = tcb->send_list.next; |
142 |
|
+ } |
143 |
|
+ while (!from_tcb && tcb != head); |
144 |
|
+ } |
145 |
|
} |
146 |
|
|
147 |
|
TRACE_IPC("receive phase curr=%t, from=%t\n", current, from_tcb); |
148 |
|
|