[sane-devel] pthreads for MacOSX (instead of child process)
Beat Birkhofer
beat.birkhofer at ilw.agrl.ethz.ch
Mon Feb 3 00:31:03 GMT 2003
Hi
There's a problem with backends (plustek in my case) that use fork()
on MacOSX. Due to the IOKit it's impossible that two processes access
the USB at the same time.
I solved the problem by replacing the child process by a pthread.
The problem: There are about 15 #ifdefs in plustek.c (quite ugly) and
I had to modify the Plustek_Scanner struct. The solution for OS/2
(sanei_thread) didn't seem very useful for my problem because I had
to apply changes to several functions.
Im not an experienced (cross platform) developer. Any ideas for an
elegant solution to implement the pthreads stuff for MacOSX/Darwin?
I uploaded the files with my changes (it's a quickhack!):
http://www.vseth.ethz.ch/~birkhofer/plustek.c
http://www.vseth.ethz.ch/~birkhofer/plustek.h
Regards
Beat H.
More information about the sane-devel
mailing list