Bug 158704: PT_FPrintStats also needs to be exported (for the test programs

only).  Define it as a no-op in optimized builds.  Deleted PT_GetStats,
which is not useful.
Modified files: primpl.h, nspr.def, ptio.c
This commit is contained in:
wtc%netscape.com 2003-01-07 04:52:25 +00:00
Родитель 9d9c1f6355
Коммит 1af4595b5b
3 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -371,6 +371,7 @@ NSPR_4.0 {
NSPRprivate {
global:
GetExecutionEnvironment;
PT_FPrintStats;
SetExecutionEnvironment;
local: *;
};

Просмотреть файл

@ -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)