From cffe021a076d2738052722d88822aaad0ed2052e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 24 Jun 2023 17:12:13 -0900 Subject: [PATCH] threads.c: comment and brace style cleanup --- citadel/server/threads.c | 110 +++++++++++++++------------------------ 1 file changed, 41 insertions(+), 69 deletions(-) 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