Skip to content

Commit

Permalink
- provide names for all Ns_Mutex to report meaningful output in aolse…
Browse files Browse the repository at this point in the history
…rver statistics

- set version number to 4.5.0p1 to differentiate from 4.5.0 unpatched release
  • Loading branch information
gneumann committed Dec 5, 2008
1 parent 0b5786a commit b150671
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/ns.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* All the public types and function declarations for the core
* AOLserver.
*
* $Header: /Users/dossy/Desktop/cvs/aolserver/include/ns.h,v 1.86 2006/07/07 03:27:22 jgdavidson Exp $
* $Header: /Users/dossy/Desktop/cvs/aolserver/include/ns.h,v 1.87 2008/12/05 08:51:44 gneumann Exp $
*/

#ifndef NS_H
Expand All @@ -46,7 +46,7 @@
+ NS_MINOR_VERSION * 100 \
+ NS_RELEASE_SERIAL)
#define NS_VERSION "4.5"
#define NS_PATCH_LEVEL "4.5.0"
#define NS_PATCH_LEVEL "4.5.0p1"

#define NS_ALPHA_RELEASE 0
#define NS_BETA_RELEASE 1
Expand Down
3 changes: 2 additions & 1 deletion nsd/limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Routines to manage resource limits.
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/limits.c,v 1.10 2005/03/28 00:06:44 jgdavidson Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/limits.c,v 1.11 2008/12/05 08:51:43 gneumann Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -273,6 +273,7 @@ FindLimits(char *limits, int create)
limitsPtr = ns_malloc(sizeof(Limits));
limitsPtr->name = Tcl_GetHashKey(&limtable, hPtr);
Ns_MutexInit(&limitsPtr->lock);
Ns_MutexSetName(&limitsPtr->lock, "ns:limits");
limitsPtr->nrunning = limitsPtr->nwaiting = 0;
limitsPtr->ntimeout = limitsPtr->ndropped = limitsPtr->noverflow = 0;
limitsPtr->maxrun = limitsPtr->maxwait = 100;
Expand Down
3 changes: 2 additions & 1 deletion nsd/pools.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Routines for the managing the connection thread pools.
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/pools.c,v 1.12 2007/10/26 23:14:17 gneumann Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/pools.c,v 1.13 2008/12/05 08:51:43 gneumann Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -382,6 +382,7 @@ CreatePool(char *name)
} else {
poolPtr = ns_calloc(sizeof(Pool), 1);
Ns_MutexInit(&poolPtr->lock);
Ns_MutexSetName(&poolPtr->lock, "ns:pools");
Ns_CondInit(&poolPtr->cond);
Tcl_SetHashValue(hPtr, poolPtr);
poolPtr->name = Tcl_GetHashKey(&pools, hPtr);
Expand Down
4 changes: 3 additions & 1 deletion nsd/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Routines for managing NsServer structures.
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/server.c,v 1.46 2006/07/07 03:27:22 jgdavidson Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/server.c,v 1.47 2008/12/05 08:51:43 gneumann Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -336,10 +336,12 @@ CreateServer(char *server)
*/

Ns_MutexInit(&servPtr->tcl.llock);
Ns_MutexSetName(&servPtr->tcl.llock, "ns:tcl.llock");
Ns_CondInit(&servPtr->tcl.lcond);
Ns_RWLockInit(&servPtr->tcl.tlock);
Ns_CsInit(&servPtr->tcl.olock);
Ns_MutexInit(&servPtr->tcl.plock);
Ns_MutexSetName(&servPtr->tcl.plock, "ns:tcl.plock");
Ns_RWLockInit(&servPtr->tcl.slock);
Tcl_InitHashTable(&servPtr->tcl.packages, TCL_STRING_KEYS);
Tcl_InitHashTable(&servPtr->tcl.once, TCL_STRING_KEYS);
Expand Down
3 changes: 2 additions & 1 deletion nsext/nsext.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
*
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsext/nsext.c,v 1.12 2003/03/19 13:54:48 mpagenva Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsext/nsext.c,v 1.13 2008/12/05 08:51:44 gneumann Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsdb.h"
#include "nsextmsg.h"
Expand Down Expand Up @@ -341,6 +341,7 @@ Ns_DbDriverInit(char *hDriver, char *configPath)
ctx->connNum = 0;
ctx->ident[0] = '\0';
Ns_MutexInit(&ctx->muIdent);
Ns_MutexSetName(&ctx->muIdent, "nsext:ident");
ctx->param = Ns_ConfigGetValue(configPath, CONFIG_PARAM);
ctx->path = Ns_ConfigGetValue(configPath, CONFIG_LOCALDAEMON);
ctx->host = Ns_ConfigGetValue(configPath, CONFIG_REMOTEHOST);
Expand Down

0 comments on commit b150671

Please sign in to comment.