Revert mistaken commit of half-finished code

merge-requests/1/head
m. allan noah 2009-01-20 13:38:38 +00:00
rodzic 0c8a3a0775
commit 9afc59953a
2 zmienionych plików z 8 dodań i 15 usunięć

Wyświetl plik

@ -60,7 +60,11 @@
#define sanei_thread_h
#include "../include/sane/config.h"
#ifdef USE_PTHREAD
typedef long SANE_Pid;
#else
typedef int SANE_Pid;
#endif
/** Initialize sanei_thread.
*

Wyświetl plik

@ -81,12 +81,6 @@
#include "../include/sane/sanei_debug.h"
#include "../include/sane/sanei_thread.h"
#ifdef USE_PTHREAD
typedef pthread_t SANEI_Pid;
#else
typedef int SANEI_Pid;
#endif
#ifndef _VAR_NOT_USED
# define _VAR_NOT_USED(x) ((x)=(x))
#endif
@ -101,11 +95,6 @@ typedef struct {
static ThreadDataDef td;
#define MAX_THREADS 100
/* per-thread information, using the functions' parameters pid as index */
static SANEI_Pid threads[MAX_THREADS];
/** for init issues - here only for the debug output
*/
void
@ -133,14 +122,14 @@ sanei_thread_kill( SANE_Pid pid )
DBG(2, "sanei_thread_kill() will kill %ld\n", (long) pid);
#ifdef USE_PTHREAD
#if defined (__APPLE__) && defined (__MACH__)
return pthread_kill(threads[pid], SIGUSR2);
return pthread_kill((pthread_t)pid, SIGUSR2);
#else
return pthread_cancel(threads[pid]);
return pthread_cancel((pthread_t)pid);
#endif
#elif defined HAVE_OS2_H
return DosKillThread(threads[pid]);
return DosKillThread(pid);
#else
return kill( threads[pid], SIGTERM );
return kill( pid, SIGTERM );
#endif
}