Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Structures | Macros | Typedefs | Functions
n_thread_pool.h File Reference
`#include "n_log.h"`
`#include "n_common.h"`
`#include <pthread.h>`
`#include <semaphore.h>`
Include dependency graph for n_thread_pool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | THREAD_POOL_NODE
struct | THREAD_POOL

## Macros

#define | SYNCED_PROC 1
#define | DIRECT_PROC 2
#define | IDLE_THREAD 1
#define | BUSY_THREAD 2
#define | RUNNING_THREAD 3
#define | EXITING_THREAD 4

## Typedefs

typedef struct THREAD_POOL_NODE | THREAD_POOL_NODE
typedef struct THREAD_POOL | THREAD_POOL

## Functions

THREAD_POOL * | new_thread_pool (int nbmaxthr)
| Create a new pool of nbmaxthr threads. More...
int | add_threaded_process (THREAD_POOL *thread_pool, void *(*func_ptr)(void *param), void *param, int mode)
| add a function and params to a thread pool More...
int | start_threaded_pool (THREAD_POOL *thread_pool)
| Launch the process waiting for exectution in the thread pool. More...
int | wait_for_threaded_pool (THREAD_POOL *thread_pool)
| Wait for all the launched process in the thread pool to terminate. More...

## Detailed Description

Thread pool declaration

Author
  Castagnier Mickael

Version
  1.0

Date
  30/04/2014

Definition in file n_thread_pool.h.