Jeff Goldszer wrote:

> This is not an LIS issue. It is just some questions pertaining to Solaris MP
> Safe streams programming. I was hoping someone can point me to documentation
> that has answers to these questions.
>
> 1)      Are locks (or mutexes) allowed to be used in queue put functions? -
> I assume the answer is YES.

We use them in our drivers with no problems.  Watch out, though, they don't
nest.

> 2)      In the case of a streams multiplexer driver, is an upper write put
> queue function allowed to be executed on the same thread that the lower read
> queue service function executing? I assume the answer is no if both
> functions are allowed to protect a critical region with the same lock.

They wouldn't be executed on the same thread, since a single thread can only
execute in one place at a time.  But Solaris STREAMS is very aggressive w.r.t.
multi-threading.  So I would assume that two threads could simultaneously
execute ANY put or service procedures in Solaris.  I have never seen the rules
stated explicitly but experience seems to be that they will execute anything at
any time unless you prevent it with mutexes.  The only thing that I count on is
that two threads won't execute the SAME put (service) procedure at the same
time.

-- Dave



_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

Reply via email to