diff --git a/nsprpub/pr/include/private/primpl.h b/nsprpub/pr/include/private/primpl.h index 180c40734eb8..87116e047203 100644 --- a/nsprpub/pr/include/private/primpl.h +++ b/nsprpub/pr/include/private/primpl.h @@ -219,22 +219,17 @@ 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/nsprpub/pr/src/nspr.def b/nsprpub/pr/src/nspr.def index c4393825135c..6d4b9c687ec2 100644 --- a/nsprpub/pr/src/nspr.def +++ b/nsprpub/pr/src/nspr.def @@ -371,6 +371,7 @@ NSPR_4.0 { NSPRprivate { global: GetExecutionEnvironment; + PT_FPrintStats; SetExecutionEnvironment; local: *; }; diff --git a/nsprpub/pr/src/pthreads/ptio.c b/nsprpub/pr/src/pthreads/ptio.c index 8a19b91dccc0..9b40a42e9ffa 100644 --- a/nsprpub/pr/src/pthreads/ptio.c +++ b/nsprpub/pr/src/pthreads/ptio.c @@ -372,15 +372,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); @@ -405,6 +403,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)