61#include "../include/sane/config.h"
65typedef pthread_t SANE_Pid;
115#define sanei_thread_invalidate(pid) ((pid) = (SANE_Pid)(-1))
127#define sanei_thread_initialize sanei_thread_invalidate
SANE_Status sanei_thread_get_status(SANE_Pid pid)
Check the current status of the spawned task.
void sanei_thread_init(void)
Initialize sanei_thread.
SANE_Bool sanei_thread_is_valid(SANE_Pid pid)
Is SANE_Pid valid pid?
SANE_Pid sanei_thread_begin(int(*func)(void *args), void *args)
Spawn a new task.
int sanei_thread_kill(SANE_Pid pid)
Terminate spawned task.
SANE_Pid sanei_thread_waitpid(SANE_Pid pid, int *status)
Wait for task termination.
int sanei_thread_sendsig(SANE_Pid pid, int sig)
Send a signal to a task.
SANE_Bool sanei_thread_is_forked(void)
Do we use processes or threads?