mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Remove use of SCM_CRITICAL_SECTION in smob.c
* libguile/smob.c (scm_make_smob_type): Use a mutex instead of a critical section, which does an async tick. Not important, just a thing I saw.
This commit is contained in:
parent
f8085163d6
commit
cb8ea3805f
1 changed files with 2 additions and 2 deletions
|
@ -205,11 +205,11 @@ scm_make_smob_type (char const *name, size_t size)
|
|||
{
|
||||
long new_smob;
|
||||
|
||||
SCM_CRITICAL_SECTION_START;
|
||||
scm_i_pthread_mutex_lock (&scm_i_misc_mutex);
|
||||
new_smob = scm_numsmob;
|
||||
if (scm_numsmob != MAX_SMOB_COUNT)
|
||||
++scm_numsmob;
|
||||
SCM_CRITICAL_SECTION_END;
|
||||
scm_i_pthread_mutex_unlock (&scm_i_misc_mutex);
|
||||
|
||||
if (new_smob == MAX_SMOB_COUNT)
|
||||
scm_misc_error (FUNC_NAME, "maximum number of smobs exceeded", SCM_EOL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue