aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd_helper.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-08 17:56:46 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-08 17:56:46 +0000
commit081fc592fa6e8cb8f262ad9dee917c658a415b42 (patch)
tree6e24039d16fad26e309bf756875960213b0ebaa6 /nscd/nscd_helper.c
parentc207f23b0b6b2d215be65e670d453768ad304247 (diff)
downloadglibc-081fc592fa6e8cb8f262ad9dee917c658a415b42.tar
glibc-081fc592fa6e8cb8f262ad9dee917c658a415b42.tar.gz
glibc-081fc592fa6e8cb8f262ad9dee917c658a415b42.tar.bz2
glibc-081fc592fa6e8cb8f262ad9dee917c658a415b42.zip
Update.
Jakub Jelinek <jakub@redhat.com> * nscd/Makefile (nscd-modules): Add nscd_setup_thread. * nscd/connections.c (nscd_run): Call setup_thread for maintenance threads. * nscd/nscd-client.h (struct database_pers_head): Add nscd_certainly_running field. * nscd/nscd.h: Declare setup_thread. * nscd/nscd_helper.c (__nscd_get_map_ref): Avoid the time test if nscd_certainly_running is nonzero. 2004-09-08 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'nscd/nscd_helper.c')
-rw-r--r--nscd/nscd_helper.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 95661b6ff3..01c4c81848 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -234,11 +234,8 @@ __nscd_get_map_ref (request_type type, const char *name,
{
/* If not mapped or timestamp not updated, request new map. */
if (cur == NULL
- // XXX The following syscalls increases the cost of the entire
- // XXX lookup by a factor of 5 but unfortunately there is not
- // XXX much we can do except hoping we get a userlevel
- // XXX implementation soon.
- || cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
+ || (cur->head->nscd_certainly_running == 0
+ && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
cur = get_mapping (type, name, &mapptr->mapped);
if (__builtin_expect (cur != NO_MAPPING, 1))