… | |
… | |
170 | { |
170 | { |
171 | aio_thread *thr = thr_arg; |
171 | aio_thread *thr = thr_arg; |
172 | aio_req req; |
172 | aio_req req; |
173 | int errno; |
173 | int errno; |
174 | |
174 | |
|
|
175 | /* we rely on gcc's ability to create closures. */ |
|
|
176 | _syscall3(int,lseek,int,fd,off_t,offset,int,whence) |
|
|
177 | _syscall3(int,read,int,fd,char *,buf,off_t,count) |
|
|
178 | _syscall3(int,write,int,fd,char *,buf,off_t,count) |
|
|
179 | _syscall3(int,open,char *,pathname,int,flags,mode_t,mode) |
|
|
180 | _syscall1(int,close,int,fd) |
|
|
181 | |
175 | sigprocmask (SIG_SETMASK, &fullsigset, 0); |
182 | sigprocmask (SIG_SETMASK, &fullsigset, 0); |
176 | |
|
|
177 | /* we rely on gcc's ability to create closures. */ |
|
|
178 | _syscall3(int,lseek,int,fd,off_t,offset,int,whence); |
|
|
179 | _syscall3(int,read,int,fd,char *,buf,off_t,count); |
|
|
180 | _syscall3(int,write,int,fd,char *,buf,off_t,count); |
|
|
181 | _syscall3(int,open,char *,pathname,int,flags,mode_t,mode); |
|
|
182 | _syscall1(int,close,int,fd); |
|
|
183 | |
183 | |
184 | /* then loop */ |
184 | /* then loop */ |
185 | while (read (reqpipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
185 | while (read (reqpipe[0], (void *)&req, sizeof (req)) == sizeof (req)) |
186 | { |
186 | { |
187 | req->thread = thr; |
187 | req->thread = thr; |