00001 /**************************************************************** 00002 * Fulguro 00003 * Copyright (C) 2004 Christophe Clienti 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the 00017 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 * Boston, MA 02111-1307, USA. 00019 ***************************************************************/ 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 #ifndef __FLGR_CORE_THREADS_H 00026 #define __FLGR_CORE_THREADS_H 00027 00028 #include <flgrCoreDll.h> 00029 #include <flgrCoreTypes.h> 00030 #include <flgrCoreErrors.h> 00031 #include <flgrCoreData.h> 00032 00041 typedef int (*FLGR_ThreadFunction) (void *param); 00042 00046 typedef struct { 00047 int argc; 00048 void **argv; 00049 }FLGR_ThreadsArg; 00050 00054 typedef struct { 00055 int threads_nb; 00056 FLGR_ThreadsArg **threads_arg; 00057 }FLGR_ThreadsArgList; 00058 00059 00061 00062 EXPORT_LIB FLGR_ThreadsArgList* flgr_threads_create_argument_list(int threads_nb); 00063 00064 EXPORT_LIB void flgr_threads_set_argument(FLGR_ThreadsArgList* arglist, int thread_index, ...); 00065 00066 EXPORT_LIB void flgr_threads_destroy_argument_list(FLGR_ThreadsArgList *arglist); 00067 00068 EXPORT_LIB FLGR_Ret flgr_threads_start(FLGR_ThreadsArgList *arglist, 00069 int threads_nb_per_fct, int threads_fct_nb, ...); 00070 00071 00072 00073 00074 00075 00076 typedef FLGR_Ret *(FLGR_2D_fptr_data2d_data2d_nhb)(FLGR_Data2D *, FLGR_Data2D *, FLGR_Data2D *); 00077 00078 00079 00080 #endif 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif