Guest User

Untitled

a guest
Jan 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include "pool.h"
  2.  
  3. // Declare a static thread_t pool of size 10
  4. #define __POOL_TYPE thread_t
  5. #define __POOL_SIZE 10
  6. #define __POOL_PREFIX thread
  7. #include "pool.inc.h"
  8.  
  9. struct thread_pool my_pool;
  10.  
  11. pool_initialize(&my_pool);
  12. thread_t *thread = pool_acquire(&my_pool);
  13. pool_release(&my_pool, thread);
Add Comment
Please, Sign In to add comment