Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreddie Chopin <freddie.chopin@gmail.com>2017-01-29 12:27:17 +0300
committerJeff Johnston <jjohnstn@redhat.com>2017-02-07 00:55:09 +0300
commit0eeb4c1d32aab0dbfd2a8f20aa326ae2d98ca1c6 (patch)
tree169fb9fc713636bec44116ba64ca15d023401a92 /newlib/libc/posix/telldir.c
parent4e46ff3e8198adc00bbf4b4455c760ff0c599f44 (diff)
Unify names of all lock objects
In preparation for the patch that would allow retargeting of locking routines, rename all lock objects to follow this pattern: "__<name>_[recursive_]mutex". Following locks were renamed: __dd_hash_lock -> __dd_hash_mutex __sfp_lock -> __sfp_recursive_mutex __sinit_lock -> __sinit_recursive_mutex __atexit_lock -> __atexit_recursive_mutex _arc4random_mutex -> __arc4random_mutex __env_lock_object -> __env_recursive_mutex __malloc_lock_object -> __malloc_recursive_mutex __atexit_mutex -> __at_quick_exit_mutex __tz_lock_object -> __tz_mutex
Diffstat (limited to 'newlib/libc/posix/telldir.c')
-rw-r--r--newlib/libc/posix/telldir.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/newlib/libc/posix/telldir.c b/newlib/libc/posix/telldir.c
index d4cf4a8c1..0a8eac024 100644
--- a/newlib/libc/posix/telldir.c
+++ b/newlib/libc/posix/telldir.c
@@ -71,7 +71,7 @@ static long dd_loccnt = 1; /* Index of entry for sequential readdir's */
static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
#ifdef HAVE_DD_LOCK
-__LOCK_INIT(static, __dd_hash_lock);
+__LOCK_INIT(static, __dd_hash_mutex);
#endif
/*
@@ -92,7 +92,7 @@ _DEFUN(telldir, (dirp),
#ifdef HAVE_DD_LOCK
__lock_acquire_recursive(dirp->dd_lock);
- __lock_acquire(__dd_hash_lock);
+ __lock_acquire(__dd_hash_mutex);
#endif
index = dd_loccnt++;
lp->loc_index = index;
@@ -102,7 +102,7 @@ _DEFUN(telldir, (dirp),
lp->loc_next = dd_hash[LOCHASH(index)];
dd_hash[LOCHASH(index)] = lp;
#ifdef HAVE_DD_LOCK
- __lock_release(__dd_hash_lock);
+ __lock_release(__dd_hash_mutex);
__lock_release_recursive(dirp->dd_lock);
#endif
return (index);
@@ -124,7 +124,7 @@ _DEFUN(_seekdir, (dirp, loc),
struct dirent *dp;
#ifdef HAVE_DD_LOCK
- __lock_acquire(__dd_hash_lock);
+ __lock_acquire(__dd_hash_mutex);
#endif
if (loc != 0) {
prevlp = &dd_hash[LOCHASH(loc)];
@@ -137,7 +137,7 @@ _DEFUN(_seekdir, (dirp, loc),
}
if (lp == NULL) {
#ifdef HAVE_DD_LOCK
- __lock_release(__dd_hash_lock);
+ __lock_release(__dd_hash_mutex);
#endif
return;
}
@@ -163,7 +163,7 @@ found:
dirp->dd_loc = 0;
}
#ifdef HAVE_DD_LOCK
- __lock_release(__dd_hash_lock);
+ __lock_release(__dd_hash_mutex);
#endif
}
@@ -175,7 +175,7 @@ _DEFUN(_cleanupdir, (dirp),
int i;
#ifdef HAVE_DD_LOCK
- __lock_acquire(__dd_hash_lock);
+ __lock_acquire(__dd_hash_mutex);
#endif
for (i = 0; i < NDIRHASH; ++i) {
struct ddloc head;
@@ -200,7 +200,7 @@ _DEFUN(_cleanupdir, (dirp),
dd_hash[i] = head.loc_next;
}
#ifdef HAVE_DD_LOCK
- __lock_release(__dd_hash_lock);
+ __lock_release(__dd_hash_mutex);
#endif
}