aio_task.c (088d67096d753a890abb25e94c57c2e594f3d236) | aio_task.c (a9515df4d66da34cbc2938e4c1f46015fc74ff93) |
---|---|
1/* 2 * Aio tasks loops 3 * 4 * Copyright (c) 2019 Virtuozzo International GmbH. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 84 unchanged lines hidden (view full) --- 93 task->pool = pool; 94 qemu_coroutine_enter(qemu_coroutine_create(aio_task_co, task)); 95} 96 97AioTaskPool *coroutine_fn aio_task_pool_new(int max_busy_tasks) 98{ 99 AioTaskPool *pool = g_new0(AioTaskPool, 1); 100 | 1/* 2 * Aio tasks loops 3 * 4 * Copyright (c) 2019 Virtuozzo International GmbH. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 84 unchanged lines hidden (view full) --- 93 task->pool = pool; 94 qemu_coroutine_enter(qemu_coroutine_create(aio_task_co, task)); 95} 96 97AioTaskPool *coroutine_fn aio_task_pool_new(int max_busy_tasks) 98{ 99 AioTaskPool *pool = g_new0(AioTaskPool, 1); 100 |
101 assert(max_busy_tasks > 0); 102 |
|
101 pool->main_co = qemu_coroutine_self(); 102 pool->max_busy_tasks = max_busy_tasks; 103 104 return pool; 105} 106 107void aio_task_pool_free(AioTaskPool *pool) 108{ --- 16 unchanged lines hidden --- | 103 pool->main_co = qemu_coroutine_self(); 104 pool->max_busy_tasks = max_busy_tasks; 105 106 return pool; 107} 108 109void aio_task_pool_free(AioTaskPool *pool) 110{ --- 16 unchanged lines hidden --- |