[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, 22 Feb 2004 07:50:36 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
Mikael Djurfeldt <address@hidden> writes:
>
> Personally, I wouldn't like Guile to have everything thread-safe
> "under the hood". That would be a terrible waste of resources.
I suppose for a start reentrant versions of things can be used when
available,
#if HAVE_CRYPT_R
{
/* FIXME: In glibc 2.3.2, crypt_data is about 128kbytes, maybe we should
think about mallocing it so as not to abuse the stack. */
struct crypt_data data;
data.initialized = 0;
return scm_makfrom0str
(crypt_r (SCM_STRING_CHARS (key), SCM_STRING_CHARS (salt), &data));
}
#else
return scm_makfrom0str
(crypt (SCM_STRING_CHARS (key), SCM_STRING_CHARS (salt)));
#endif