sane-project-website/old-archive/1998-09/0019.html

83 wiersze
3.5 KiB
HTML

<!-- received="Tue Sep 1 23:39:12 1998 PDT" -->
<!-- sent="Wed, 02 Sep 1998 08:39:18 +0100" -->
<!-- name="Yuri Dario" -->
<!-- email="mc6530@mclink.it" -->
<!-- subject="Re: SANEI_THREAD proposal" -->
<!-- id="199809020638.IAA12655@ammi.mclink.it" -->
<!-- inreplyto="SANEI_THREAD proposal" -->
<title>sane-devel: Re: SANEI_THREAD proposal</title>
<h1>Re: SANEI_THREAD proposal</h1>
<b>Yuri Dario</b> (<a href="mailto:mc6530@mclink.it"><i>mc6530@mclink.it</i></a>)<br>
<i>Wed, 02 Sep 1998 08:39:18 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#19">[ date ]</a><a href="index.html#19">[ thread ]</a><a href="subject.html#19">[ subject ]</a><a href="author.html#19">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0020.html">Dr. Andreas Bolsch: "Re: Mustek ScanExpress Backend"</a>
<li> <b>Previous message:</b> <a href="0018.html">Ronald Janowsky: "Re: Film scanner"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On Fri, 14 Aug 1998 12:57:33 -0400 (EDT), Matto Marjanovic wrote:<br>
<p>
<i>&gt;My point exactly (i.e. 3 params) --- if the original code used fork(),</i><br>
<i>&gt; what params would you give to sanei_thread_begin()?</i><br>
<p>
they are reader function address, thread stack size (but could be moved inside API) and a pointer to scanner data <br>
structure.<br>
<p>
<i>&gt;Would it be possible for the OS/2 sanei_scsi commands to check if the</i><br>
<i>&gt; pid has changed, and then create a new semaphore in the child?</i><br>
<p>
that's the problem: I can't use a new semaphore, I need to inherit the previous one.<br>
<p>
<i>&gt;It seems really backwards to hack all the backends to accommodate the</i><br>
<i>&gt; deficiencies of some DOS-based device driver (e.g. "DosCreateEventSem()"),</i><br>
<i>&gt; since, if I wanted to be stuck in the DOS world, I wouldn't be using Unix.</i><br>
<p>
Under OS/2, the three initial lettes are used to identify the type of API: Dos stands for Disk Operating System, but it not <br>
related to MS-DOS. Never seen a semaphore under MS-DOS.<br>
<p>
<i>&gt;(Of course, if this were the catalyst to bring about an elegant</i><br>
<i>&gt; improvement in the structure of backends, that would be another story.)</i><br>
<p>
maybe.<br>
<p>
<i>&gt;If I wrote a backend to use threads under Unix, I wouldn't use pipes at</i><br>
<i>&gt; all. I would just write directly into some buffer, since all the threads</i><br>
<i>&gt; in a process share the same memory space. That's the major advantage of</i><br>
<i>&gt; threads.</i><br>
<p>
but this needs to have two different coding for threaded systems and non threaded system: using a pipe is available on <br>
both.<br>
<p>
Now I'm replacing fork() with my API, otherwise backends doesn't work. So I can have a stable SANE port under OS/2. <br>
When the threaded API will be approved by SANE team, the code could be changed easily.<br>
<p>
<p>
Bye,<br>
<p>
Yuri Dario<br>
<p>
/*<br>
* member of TeamOS/2 - Italy<br>
*/<br>
<p>
<p>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0020.html">Dr. Andreas Bolsch: "Re: Mustek ScanExpress Backend"</a>
<li> <b>Previous message:</b> <a href="0018.html">Ronald Janowsky: "Re: Film scanner"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>