| 245 | } |
| 246 | |
| 247 | S32 iFileReadAsync(tag_xFile* file, void* buf, U32 aSize, void (*callback)(tag_xFile*), |
| 248 | S32 priority) |
| 249 | { |
| 250 | static S32 fopcount = 1; |
| 251 | tag_iFile* ps = &file->ps; |
| 252 | S32 i; |
| 253 | |
| 254 | for (i = 0; i < 4; i++) |
| 255 | { |
| 256 | if (file_queue[i].stat != IFILE_RDSTAT_QUEUED && file_queue[i].stat != IFILE_RDSTAT_INPROG) |
| 257 | { |
| 258 | S32 id = fopcount++ << 2; |
| 259 | S32 asynckey = id + i; |
| 260 | |
| 261 | file_queue[i].file = file; |
| 262 | file_queue[i].buf = buf; |
| 263 | file_queue[i].size = aSize; |
| 264 | file_queue[i].offset = 0; |
| 265 | file_queue[i].stat = IFILE_RDSTAT_QUEUED; |
| 266 | file_queue[i].callback = callback; |
| 267 | file_queue[i].asynckey = asynckey; |
| 268 | |
| 269 | aSize = (aSize < 32) ? ALIGN(aSize, 4) : 32; |
| 270 | |
| 271 | ps->fileInfo.cb.userData = (void*)i; |
| 272 | |
| 273 | DVDReadAsync(&ps->fileInfo, buf, aSize, ps->offset, async_cb); |
| 274 | |
| 275 | ps->asynckey = asynckey; |
| 276 | |
| 277 | return id + i; |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | return -1; |
| 282 | } |
| 283 | |
| 284 | IFILE_READSECTOR_STATUS iFileReadAsyncStatus(S32 key, S32* amtToFar) |
| 285 | { |
no outgoing calls
no test coverage detected