"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/rpc/rpc-lib/src/autoscale-threads.c" (16 Sep 2020, 700 Bytes) of package /linux/misc/glusterfs-8.2.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "autoscale-threads.c" see the Fossies "Dox" file reference documentation.

    1 /*
    2    Copyright (c) 2018 Red Hat, Inc. <http://www.redhat.com>
    3    This file is part of GlusterFS.
    5    This file is licensed to you under your choice of the GNU Lesser
    6    General Public License, version 3 or any later version (LGPLv3 or
    7    later), or the GNU General Public License, version 2 (GPLv2), in all
    8    cases as published by the Free Software Foundation.
    9 */
   11 #include <glusterfs/gf-event.h>
   12 #include "rpcsvc.h"
   14 void
   15 rpcsvc_autoscale_threads(glusterfs_ctx_t *ctx, rpcsvc_t *rpc, int incr)
   16 {
   17     struct event_pool *pool = ctx->event_pool;
   18     int thread_count = pool->eventthreadcount;
   20     pool->auto_thread_count += incr;
   21     (void)gf_event_reconfigure_threads(pool, thread_count + incr);
   22 }