diff options
author | wtc%netscape.com <devnull@localhost> | 2003-01-08 03:25:54 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-01-08 03:25:54 +0000 |
commit | 0602b95c00fd8057bcdf423508d2e4dcd64f58aa (patch) | |
tree | 0223e8f297cd197fc8cec6bd61d745f2f998afe1 | |
parent | 96af0c84286e03b3a2fed0750b90271243faec3a (diff) | |
download | nspr-hg-SUN_COMPONENT_PACK_V_1_1.tar.gz |
Bug 158704: PT_FPrintStats also needs to be exported (for the test programsSUN_COMPONENT_PACK_V_1_1NSPR_4_1_3_RTMNSPRPUB_RELEASE_4_1_3_SunRC010903NSPRPUB_RELEASE_4_1_3_RTM
only). Define it as a no-op in optimized builds or classic NSPR. Deleted
PT_GetStats, which is not useful.
Modified files: primpl.h, nspr.def, prio.c, ptio.c
Tag: NSPRPUB_RELEASE_4_1_BRANCH
-rw-r--r-- | pr/include/private/primpl.h | 15 | ||||
-rw-r--r-- | pr/src/io/prio.c | 9 | ||||
-rw-r--r-- | pr/src/nspr.def | 1 | ||||
-rw-r--r-- | pr/src/pthreads/ptio.c | 11 |
4 files changed, 21 insertions, 15 deletions
diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h index b3bf72d2..629aae33 100644 --- a/pr/include/private/primpl.h +++ b/pr/include/private/primpl.h @@ -216,22 +216,13 @@ typedef struct PTDebug PRUintn cvars_notified, delayed_cv_deletes; } PTDebug; -NSPR_API(void) PT_GetStats(PTDebug* here); -NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - -#else - -typedef PRUintn PTDebug; -#define PT_GetStats(_p) -#define PT_FPrintStats(_fd, _msg) - #endif /* defined(DEBUG) */ +NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); + #else /* defined(_PR_PTHREADS) */ -typedef PRUintn PTDebug; -#define PT_GetStats(_p) -#define PT_FPrintStats(_fd, _msg) +NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); /* ** This section is contains those parts needed to implement NSPR on diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c index ce5c021b..ea762a40 100644 --- a/pr/src/io/prio.c +++ b/pr/src/io/prio.c @@ -167,3 +167,12 @@ PR_IMPLEMENT(PRStatus) PR_SetFDInheritable( return PR_FAILURE; #endif } + +/* +** This function only has a useful implementation in the debug build of +** the pthreads version. +*/ +PR_IMPLEMENT(void) PT_FPrintStats(PRFileDesc *debug_out, const char *msg) +{ + /* do nothing */ +} /* PT_FPrintStats */ diff --git a/pr/src/nspr.def b/pr/src/nspr.def index c4393825..6d4b9c68 100644 --- a/pr/src/nspr.def +++ b/pr/src/nspr.def @@ -371,6 +371,7 @@ NSPR_4.0 { NSPRprivate { global: GetExecutionEnvironment; + PT_FPrintStats; SetExecutionEnvironment; local: *; }; diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 175476ce..f61889ec 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -343,15 +343,13 @@ struct pt_Continuation PTDebug pt_debug; /* this is shared between several modules */ -PR_IMPLEMENT(void) PT_GetStats(PTDebug* here) { *here = pt_debug; } - PR_IMPLEMENT(void) PT_FPrintStats(PRFileDesc *debug_out, const char *msg) { PTDebug stats; char buffer[100]; PRExplodedTime tod; PRInt64 elapsed, aMil; - PT_GetStats(&stats); /* a copy */ + stats = pt_debug; /* a copy */ PR_ExplodeTime(stats.timeStarted, PR_LocalTimeParameters, &tod); (void)PR_FormatTime(buffer, sizeof(buffer), "%T", &tod); @@ -376,6 +374,13 @@ PR_IMPLEMENT(void) PT_FPrintStats(PRFileDesc *debug_out, const char *msg) stats.cvars_notified, stats.delayed_cv_deletes); } /* PT_FPrintStats */ +#else + +PR_IMPLEMENT(void) PT_FPrintStats(PRFileDesc *debug_out, const char *msg) +{ + /* do nothing */ +} /* PT_FPrintStats */ + #endif /* DEBUG */ #if defined(_PR_POLL_WITH_SELECT) |