diff options
Diffstat (limited to 'usr/src/cmd/nscd/cache.c')
-rw-r--r-- | usr/src/cmd/nscd/cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/cmd/nscd/cache.c b/usr/src/cmd/nscd/cache.c index 2ffb95c30d..050154122c 100644 --- a/usr/src/cmd/nscd/cache.c +++ b/usr/src/cmd/nscd/cache.c @@ -22,6 +22,7 @@ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright 2018 Joyent, Inc. */ /* @@ -48,6 +49,7 @@ #include <string.h> #include <umem.h> #include <fcntl.h> +#include <pthread.h> #include "cache.h" #include "nscd_door.h" #include "nscd_log.h" @@ -1817,6 +1819,8 @@ init_cache_ctx(int i) { static void revalidate(nsc_ctx_t *ctx) { + (void) pthread_setname_np(pthread_self(), "revalidate"); + for (;;) { int i, slp, interval, count; @@ -1961,6 +1965,8 @@ static void do_update(nsc_lookup_args_t *in) { nss_pheader_t *phdr = (nss_pheader_t *)in->buffer; + (void) pthread_setname_np(pthread_self(), "do_update"); + /* update the length of the data buffer */ phdr->data_len = phdr->pbufsiz - phdr->data_off; @@ -2190,6 +2196,8 @@ reaper(nsc_ctx_t *ctx) ulong_t nsc_entries; char *me = "reaper"; + (void) pthread_setname_np(pthread_self(), "reaper"); + for (;;) { (void) mutex_lock(&ctx->stats_mutex); nsc_entries = ctx->stats.entries; |