From 081fc592fa6e8cb8f262ad9dee917c658a415b42 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Sep 2004 17:56:46 +0000 Subject: Update. Jakub Jelinek * 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 --- nscd/nscd_helper.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nscd/nscd_helper.c') 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)) -- cgit v1.2.3