Rev 1757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1757 | Rev 1780 | ||
---|---|---|---|
Line 136... | Line 136... | ||
136 | /** Find call_t * in call table according to callid |
136 | /** Find call_t * in call table according to callid |
137 | * |
137 | * |
138 | * TODO: Some speedup (hash table?) |
138 | * TODO: Some speedup (hash table?) |
139 | * @return NULL on not found, otherwise pointer to call structure |
139 | * @return NULL on not found, otherwise pointer to call structure |
140 | */ |
140 | */ |
141 | call_t * get_call(__native callid) |
141 | call_t * get_call(unative_t callid) |
142 | { |
142 | { |
143 | link_t *lst; |
143 | link_t *lst; |
144 | call_t *call, *result = NULL; |
144 | call_t *call, *result = NULL; |
145 | 145 | ||
146 | spinlock_lock(&TASK->answerbox.lock); |
146 | spinlock_lock(&TASK->answerbox.lock); |
147 | for (lst = TASK->answerbox.dispatched_calls.next; |
147 | for (lst = TASK->answerbox.dispatched_calls.next; |
148 | lst != &TASK->answerbox.dispatched_calls; lst = lst->next) { |
148 | lst != &TASK->answerbox.dispatched_calls; lst = lst->next) { |
149 | call = list_get_instance(lst, call_t, link); |
149 | call = list_get_instance(lst, call_t, link); |
150 | if ((__native)call == callid) { |
150 | if ((unative_t)call == callid) { |
151 | result = call; |
151 | result = call; |
152 | break; |
152 | break; |
153 | } |
153 | } |
154 | } |
154 | } |
155 | spinlock_unlock(&TASK->answerbox.lock); |
155 | spinlock_unlock(&TASK->answerbox.lock); |