[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: crypt mutex
From: |
Kevin Ryde |
Subject: |
Re: crypt mutex |
Date: |
Sun, 21 Mar 2004 08:51:57 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
Marius Vollmer <address@hidden> writes:
>
> Yes, that is what I meant. But, if making a function be reentrant
> takes a mutex then we should not hesitate to use one.
Speaking of mutexes, the reason I haven't checked in what I posted is
that I'm wondering if crypt should have its own private mutex.
A mutex for every function seems a bit wasteful, even if it would give
maximum parallelism. I'm thinking crypt is cpu-only and not often
run, so might as well share a single global mutex.
Incidentally, crypt_r measures significantly slower (about 5x) than
crypt, presumably because it does various initializations, so I'm
thinking not to use that.