sanei_thread.h

Go to the documentation of this file.
00001 /* sane - Scanner Access Now Easy.
00002    Copyright (C) 1998-2001 Yuri Dario
00003    Copyright (C) 2002-2003 Henning Meier-Geinitz (documentation)
00004    Copyright (C) 2003-2004 Gerhard Jaeger (pthread/process support)
00005    This file is part of the SANE package.
00006 
00007    SANE is free software; you can redistribute it and/or modify it under
00008    the terms of the GNU General Public License as published by the Free
00009    Software Foundation; either version 2 of the License, or (at your
00010    option) any later version.
00011 
00012    SANE is distributed in the hope that it will be useful, but WITHOUT
00013    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015    for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with sane; see the file COPYING.  If not, write to the Free
00019    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 
00021    As a special exception, the authors of SANE give permission for
00022    additional uses of the libraries contained in this release of SANE.
00023 
00024    The exception is that, if you link a SANE library with other files
00025    to produce an executable, this does not by itself cause the
00026    resulting executable to be covered by the GNU General Public
00027    License.  Your use of that executable is in no way restricted on
00028    account of linking the SANE library code into it.
00029 
00030    This exception does not, however, invalidate any other reasons why
00031    the executable file might be covered by the GNU General Public
00032    License.
00033 
00034    If you submit changes to SANE to the maintainers to be included in
00035    a subsequent release, you agree by submitting the changes that
00036    those changes may be distributed with this exception intact.
00037 
00038    If you write modifications of your own for SANE, it is your choice
00039    whether to permit this exception to apply to your modifications.
00040    If you do not wish that, delete this exception notice.
00041 
00042 */
00043 
00059 #ifndef sanei_thread_h
00060 #define sanei_thread_h
00061 #include "../include/sane/config.h"
00062 
00063 #ifdef USE_PTHREAD
00064 typedef long SANE_Pid;
00065 #else
00066 typedef int SANE_Pid;
00067 #endif
00068 
00073 extern void sanei_thread_init (void);
00074 
00083 extern SANE_Bool sanei_thread_is_forked (void);
00084 
00096 extern SANE_Pid sanei_thread_begin (int (*func) (void *args), void *args);
00097 
00111 extern int sanei_thread_kill (SANE_Pid pid);
00112 
00126 extern int sanei_thread_sendsig (SANE_Pid pid, int sig);
00127 
00140 extern SANE_Pid sanei_thread_waitpid (SANE_Pid pid, int *status);
00141 
00151 extern SANE_Status sanei_thread_get_status (SANE_Pid pid);
00152 
00153 #endif /* sanei_thread_h */

Generated on Fri Oct 3 04:45:39 2008 for SANEI by  doxygen 1.5.1