* gettext-runtime/intl/dcigettext.c (lock): Move outside _nl_find_msg.
* gettext-runtime/intl/finddomain.c (lock): Move outside _nl_find_domain.
* gettext-runtime/intl/loadmsgcat.c (lock): Move outside _nl_load_domain.
}
+/* This lock primarily protects the memory management variables freemem,
+ freemem_size. It also protects write accesses to convd->conv_tab.
+ It's not worth using a separate lock (such as domain->conversions_lock)
+ for this purpose, because when modifying convd->conv_tab, we also need
+ to lock freemem, freemem_size for most of the time. */
+__libc_lock_define_initialized (static, lock)
+
/* Look up the translation of msgid within DOMAIN_FILE and DOMAINBINDING.
Return it if found. Return NULL if not found or in case of a conversion
failure (problem in the particular message catalog). Return (char *) -1
handle this case by converting RESULTLEN bytes, including
NULs. */
- /* This lock primarily protects the memory management variables
- freemem, freemem_size. It also protects write accesses to
- convd->conv_tab. It's not worth using a separate lock (such
- as domain->conversions_lock) for this purpose, because when
- modifying convd->conv_tab, we also need to lock freemem,
- freemem_size for most of the time. */
- __libc_lock_define_initialized (static, lock)
-
if (__builtin_expect (convd->conv_tab == NULL, 0))
{
__libc_lock_lock (lock);
/* Handle list of needed message catalogs
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software: you can redistribute it and/or modify
/* List of already loaded domains. */
static struct loaded_l10nfile *_nl_loaded_domains;
+/* Lock that protects the access to _NL_LOADED_DOMAINS. */
+gl_rwlock_define_initialized (static, lock);
+
/* Return a data structure describing the message catalog described by
the DOMAINNAME and CATEGORY parameters with respect to the currently
*/
/* We need to protect modifying the _NL_LOADED_DOMAINS data. */
- gl_rwlock_define_initialized (static, lock);
gl_rwlock_rdlock (lock);
/* If we have already tested for this locale entry there has to
/* Load needed message catalogs.
- Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
return NULL;
}
+/* Lock that protects the various 'struct loaded_l10nfile' objects. */
+__libc_lock_define_initialized_recursive (static, lock);
+
/* Load the message catalogs specified by FILENAME. If it is no valid
message catalog do nothing. */
void
int revision;
const char *nullentry;
size_t nullentrylen;
- __libc_lock_define_initialized_recursive (static, lock);
__libc_lock_lock_recursive (lock);
if (domain_file->decided != 0)