Hi all,

I'm looking for a reviewer of attached patch and I'm also hoping
someone has a scanner who's driver uses threads can test this patch to
verify no regressions occurred (be sure and use --enable-pthread on
configure).

Current code assumes/requires that SANE_Pid is represented as an
integer on all platforms because we do "pid == -1" checks everywhere.

Pthreads says that it can not be assumed pthread_t is an integer and
on windows platform it in fact is not an integer.  Attached is my
solution to abstract out checks for valid PID's so that it will work
with windows and any other pthread implementation that is similar.

For each backend that gets ported to mingw and uses threads, it will
need to switch to use sanei_thread_is_invalid(pid) instead of (pid ==
-1).  That was not done as a part of this test patch.

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread.diff
Type: text/x-patch
Size: 4374 bytes
Desc: not available
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20111106/e7b07e80/attachment.bin>

Reply via email to