Re: Porting SANE backends

Milon Firikis (milonf@ariadne-t.gr)
Mon, 01 Mar 1999 13:14:38 +0200

David Mosberger-Tang wrote:
>
> >>>>> On Sun, 28 Feb 1999 18:21:32 +0200, Milon Firikis <milonf@ariadne-t.gr> said:
>
> Milon> Note that the objective is to hide all Unix specific
> Milon> functions from the backend much like the sanei_scsi_ routines
> Milon> do for scsi operations.
>
> You're wrong. Yes, the _API_ must be OS independent but the sample
> implementation that we distribute is developed and intended for
> POSIX-compatible systems. If we can port that source to other
> platforms easily and cleanly, great, but to say that we want to hide
> all UNIX/POSIX specific functions is silly.

Since the backends are mostly mid level drivers they should contain all
the scanner protocol information just as they do now. I just thought
that it would be nicer if the InterPorcess communication was somehow
(Thread | Process) handled by the SANE API and not by the backend
itself.

> The issue with fork() is that it's hard (inefficient) to implement on
> any system that doesn't have virtual memory. However, threads do not
> necessarily solve the problem either. E.g., on systems supporting
> user-level threads only (e.g., SunOS, HP-UX up to 10.20, etc.), a
> thread may not even help for SANE backends.
>

I thought OS/2 had virtual memory management. I am not sure though.

User level threads are out of the question if I understood you
correctly. You need kernel level threads in order to allow non blocking
access to frontend.

MF

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