зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
7841f005b8
Коммит
69f9a94067
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче