… | |
… | |
85 | { |
85 | { |
86 | dSP; |
86 | dSP; |
87 | int count = 0; |
87 | int count = 0; |
88 | aio_req req, prv; |
88 | aio_req req, prv; |
89 | |
89 | |
90 | static int rl;//D |
|
|
91 | //printf ("%d ENTER\n", ++rl);//D |
|
|
92 | |
|
|
93 | pthread_mutex_lock (&reslock); |
90 | pthread_mutex_lock (&reslock); |
94 | |
91 | |
95 | { |
92 | { |
96 | /* read any signals sent by the worker threads */ |
93 | /* read any signals sent by the worker threads */ |
97 | char buf [32]; |
94 | char buf [32]; |
… | |
… | |
105 | pthread_mutex_unlock (&reslock); |
102 | pthread_mutex_unlock (&reslock); |
106 | |
103 | |
107 | while (req) |
104 | while (req) |
108 | { |
105 | { |
109 | nreqs--; |
106 | nreqs--; |
110 | //printf ("%d count %d %p->%p\n", rl, count, req, req->next);//D |
|
|
111 | |
107 | |
112 | if (req->type == REQ_QUIT) |
108 | if (req->type == REQ_QUIT) |
113 | started--; |
109 | started--; |
114 | else |
110 | else |
115 | { |
111 | { |
… | |
… | |
169 | Safefree (prv); |
165 | Safefree (prv); |
170 | |
166 | |
171 | /* TODO: croak on errors? */ |
167 | /* TODO: croak on errors? */ |
172 | } |
168 | } |
173 | |
169 | |
174 | //printf ("%d LEAVE %p %p\n", rl--, ress, rese);//D |
|
|
175 | return count; |
170 | return count; |
176 | } |
171 | } |
177 | |
172 | |
178 | static void *aio_proc(void *arg); |
173 | static void *aio_proc(void *arg); |
179 | |
174 | |