diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-02-13 20:36:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-02-13 20:36:37 +0000 |
commit | 20e498bdb0608ae6ca431cb49d66d2ed6f5304f5 (patch) | |
tree | 55ff7b1aeaaefd6e82c5370ed0fdd91673cd92e5 /nscd/connections.c | |
parent | d8111eac5422eded7a8680ca198eb5d149a38550 (diff) | |
download | glibc-20e498bdb0608ae6ca431cb49d66d2ed6f5304f5.tar.gz glibc-20e498bdb0608ae6ca431cb49d66d2ed6f5304f5.tar.xz glibc-20e498bdb0608ae6ca431cb49d66d2ed6f5304f5.zip |
[BZ #5381]
2009-02-13 Ulrich Drepper <drepper@redhat.com> [BZ #5381] * nscd/nscd.h: Remove definitions and declarations for mem_in_flight. Change mempool_alloc prototype. * nscd/mem.c (gc): Don't handle mem_in_flight. (mempool_alloc): Third parameter now only indicates whether this is the first call (to allocate data) or not. If it is, get db rdlock. Release it on error. Don't handle mem_in_flight. * nscd/aicache.c (addhstaiX): Mark he parameter as const. Adjust third parameter of mempool_alloc calls. Nothing to do here in case mempool_alloc fails. Avoid local variable shadowing parameter. No need to get db rdlock before calling cache_add. * nscd/cache.c (cache_add): Adjust call to mempool_alloc. There is no mem_in_flight array anymore. * nscd/connections.c: Remove definition and handling of mem_in_flight. * nscd/grpcache.c (cache_addgr): Adjust third parameter of mempool_alloc calls. Mark he parameter as const. Nothing to do here in case mempool_alloc fails. No need to get db rdlock before calling cache_add. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/servicescache.c (cache_addserv): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. Remove some debugging code.
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 7e3a406185..3d0727f33b 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -250,11 +250,6 @@ static int have_accept4; /* Number of times clients had to wait. */ unsigned long int client_queued; -/* Data structure for recording in-flight memory allocation. */ -__thread struct mem_in_flight mem_in_flight attribute_tls_model_ie; -/* Global list of the mem_in_flight variables of all the threads. */ -struct mem_in_flight *mem_in_flight_list; - ssize_t writeall (int fd, const void *buf, size_t len) @@ -1584,16 +1579,6 @@ nscd_run_worker (void *p) { char buf[256]; - /* Initialize the memory-in-flight list. */ - for (enum in_flight idx = 0; idx < IDX_last; ++idx) - mem_in_flight.block[idx].dbidx = -1; - /* And queue this threads structure. */ - do - mem_in_flight.next = mem_in_flight_list; - while (atomic_compare_and_exchange_bool_acq (&mem_in_flight_list, - &mem_in_flight, - mem_in_flight.next) != 0); - /* Initial locking. */ pthread_mutex_lock (&readylist_lock); |