Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pool.h"
- // Declare a static thread_t pool of size 10
- #define __POOL_TYPE thread_t
- #define __POOL_SIZE 10
- #define __POOL_PREFIX thread
- #include "pool.inc.h"
- struct thread_pool my_pool;
- pool_initialize(&my_pool);
- thread_t *thread = pool_acquire(&my_pool);
- pool_release(&my_pool, thread);
Add Comment
Please, Sign In to add comment