Changeset 9282
- Timestamp:
- 04/18/12 09:22:25 (14 months ago)
- Location:
- branches/asyncio/src/client/usrint
- Files:
-
- 2 modified
-
aiocommon.c (modified) (3 diffs)
-
aiocommon.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/asyncio/src/client/usrint/aiocommon.c
r9281 r9282 123 123 pthread_mutex_lock(&waiting_list_mutex); 124 124 qlist_add_tail(&(list[i]->link), aio_waiting_list); 125 list[i]->a_cb->__error_code = EINPROGRESS; 125 126 gossip_debug(GOSSIP_USRINT_DEBUG, "%d AIO requests now waiting\n", 126 127 qlist_count(aio_waiting_list)); … … 240 241 struct qlist_head *next_io; 241 242 struct pvfs_aiocb *io_cb; 242 PVFS_sys_op_id ret_op_ids[PVFS_AIO_MAX_ PROGRESS_OPS];243 PVFS_sys_op_id ret_op_ids[PVFS_AIO_MAX_RUNNING]; 243 244 PVFS_sys_op_id temp_running_ops[PVFS_AIO_MAX_RUNNING] = {0}; 244 int err_code_array[PVFS_AIO_MAX_ PROGRESS_OPS] = {0};245 struct pvfs_aiocb *aiocb_array[PVFS_AIO_MAX_ PROGRESS_OPS] = {NULL};245 int err_code_array[PVFS_AIO_MAX_RUNNING] = {0}; 246 struct pvfs_aiocb *aiocb_array[PVFS_AIO_MAX_RUNNING] = {NULL}; 246 247 247 248 gossip_debug(GOSSIP_USRINT_DEBUG, "AIO progress thread starting up\n"); … … 361 362 362 363 num_aiocbs_running--; 363 if (!num_aiocbs_running) 364 pthread_mutex_lock(&waiting_list_mutex); 365 if (!num_aiocbs_running && qlist_empty(aio_waiting_list)) 364 366 { 365 367 gossip_debug(GOSSIP_USRINT_DEBUG, "No running requests, progress thread exiting\n"); 366 368 progress_running = PVFS_AIO_PROGRESS_IDLE; 369 pthread_mutex_unlock(&waiting_list_mutex); 367 370 pthread_mutex_unlock(&progress_sync_mutex); 368 371 pthread_exit(NULL); 369 372 } 373 pthread_mutex_unlock(&waiting_list_mutex); 370 374 } 371 375 pthread_mutex_unlock(&progress_sync_mutex); -
branches/asyncio/src/client/usrint/aiocommon.h
r9226 r9282 18 18 #include "gossip.h" 19 19 20 #define PVFS_AIO_MAX_RUNNING 520 #define PVFS_AIO_MAX_RUNNING 10 21 21 #define PVFS_AIO_LISTIO_MAX 10 22 #define PVFS_AIO_MAX_PROGRESS_OPS 1023 22 24 23 #define PVFS_AIO_PROGRESS_IDLE 0
