Re: SANEI_THREAD proposal

Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Sat, 01 Aug 1998 21:15:52 +0200

Yuri Dario wrote:

> Hi,
>
> I have wrote an initial API for thread support. It consist of 3 functions
>
> extern int sanei_thread_begin( void (*start)(void *arg),
> unsigned stack_size,
> void *arg_list);
> extern int sanei_thread_kill( int pid, int sig);
> extern int sanei_thread_wait( int pid, int *stat_loc, int options);
>
> that should replace fork(), kill() and waitpid(). They have the same parameters, except for thread_begin that require a
> pointer to a function, a stack size and a pointer to data.
>
> I have included also the patches to the Umax backend as example. There is only one problem: the call to close(fds[1]),
> must be avoided when using threads. I think it could be removed also on other platforms, because file handles are
> closed automatically at process exit.
> I have also added reader_fds to Umax_Scanner structure, so I don't need to create another data structure, as I wrote in
> the past.
>
> If you find that changes useful, I will add them also to Mustek,Tamarack, SnapScan, Coolscan backends. Without that
> changes, those backends wont work under OS/2.
>
> I have tested the code on an Umax Astra 610S, connected to my (old!) Adaptec 1542CF.
>

Hi Yuir, hi everybody,

it looks ok for me, so if we decide to include these functions, I will change the umax backend to work
the way like described in the umax-patch.

Bye
Oliver

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com