From: Art Cancro Date: Sun, 25 Jun 2023 02:12:13 +0000 (-0900) Subject: threads.c: comment and brace style cleanup X-Git-Tag: v981~68 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=cffe021a076d2738052722d88822aaad0ed2052e;p=citadel.git threads.c: comment and brace style cleanup --- diff --git a/citadel/server/threads.c b/citadel/server/threads.c index e21d83e4a..a745d2a45 100644 --- a/citadel/server/threads.c +++ b/citadel/server/threads.c @@ -1,11 +1,9 @@ -/* - * Thread handling stuff for Citadel server - * - * Copyright (c) 1987-2021 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 3. - */ +// Thread handling stuff for the Citadel server +// +// Copyright (c) 1987-2023 by the citadel.org team +// +// This program is open source software. Use, duplication, or disclosure +// is subject to the terms of the GNU General Public License, version 3. #include #include @@ -18,35 +16,29 @@ #include "context.h" #include "threads.h" -int num_workers = 0; /* Current number of worker threads */ -int active_workers = 0; /* Number of ACTIVE worker threads */ +int num_workers = 0; // Current number of worker threads +int active_workers = 0; // Number of ACTIVE worker threads pthread_key_t ThreadKey; -pthread_mutex_t Critters[MAX_SEMAPHORES]; /* Things needing locking */ +pthread_mutex_t Critters[MAX_SEMAPHORES]; // Things needing locking struct thread_tsd masterTSD; -int server_shutting_down = 0; /* set to nonzero during shutdown */ +int server_shutting_down = 0; // set to nonzero during shutdown pthread_mutex_t ThreadCountMutex; -void InitializeSemaphores(void) -{ +void InitializeSemaphores(void) { int i; - /* Set up a bunch of semaphores to be used for critical sections */ + // Set up a bunch of semaphores to be used for critical sections for (i=0; i