3 * Copyright (C) 2008 Felipe Astroza
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * Copyright (C) 2008 Felipe Astroza
24 * This program is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License as published by
26 * the Free Software Foundation; either version 2 of the License, or
27 * (at your option) any later version.
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU Library General Public License for more details.
34 * You should have received a copy of the GNU General Public License
35 * along with this program; if not, write to the Free Software
36 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
44 #include <mk_common.h>
47 unsigned int pl_quantity
;
49 mk_queue
*pl_rqq
; /* Requests queue */
52 int pl_wakeup
; /* Threads wait in pl_wakeup address */
61 #define MK_THREAD_UNLOCKED_VAL 0
62 #define MK_THREAD_LOCKED_VAL (MK_THREAD_UNLOCKED_VAL+1)
64 mk_thread_pool
*mk_thread_pool_create(unsigned int n
);
66 void mk_thread_mutex_lock(int *lock
);
67 void mk_thread_mutex_unlock(int *lock
);
69 int mk_thread_pool_set(mk_thread_pool
*pool
, void (func
)(void *data
), void *data
);