diff options
Diffstat (limited to 'nsprpub/pr/tests/logger.c')
-rw-r--r-- | nsprpub/pr/tests/logger.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nsprpub/pr/tests/logger.c b/nsprpub/pr/tests/logger.c index a44ef4ee1..ee28d41d7 100644 --- a/nsprpub/pr/tests/logger.c +++ b/nsprpub/pr/tests/logger.c @@ -38,9 +38,9 @@ static void Error(const char* msg) static void PR_CALLBACK forked(void *arg) { PRIntn i; - PRLock *ml; - PRCondVar *cv; - + PRLock *ml; + PRCondVar *cv; + PR_LogPrint("%s logging creating mutex\n", (const char*)arg); ml = PR_NewLock(); PR_LogPrint("%s logging creating condition variable\n", (const char*)arg); @@ -53,7 +53,7 @@ static void PR_CALLBACK forked(void *arg) PR_WaitCondVar(cv, PR_SecondsToInterval(1)); PR_Unlock(ml); } - + PR_LogPrint("%s logging destroying condition variable\n", (const char*)arg); PR_DestroyCondVar(cv); PR_LogPrint("%s logging destroying mutex\n", (const char*)arg); @@ -68,18 +68,18 @@ static void UserLogStuff( void ) myLM = PR_NewLogModule( "userStuff" ); if (! myLM ) - { + { printf("UserLogStuff(): can't create new log module\n" ); return; - } + } PR_LOG( myLM, PR_LOG_NOTICE, ("Log a Notice %d\n", 1 )); for (i = 0; i < 10 ; i++ ) - { + { PR_LOG( myLM, PR_LOG_DEBUG, ("Log Debug number: %d\n", i)); PR_Sleep( 300 ); - } + } } /* end UserLogStuff() */ @@ -107,10 +107,10 @@ int main(int argc, char **argv) /* ** Now change buffering. */ - PR_SetLogBuffering( 65500 ); - thread = PR_CreateThread( - PR_USER_THREAD, forked, (void*)argv[0], PR_PRIORITY_NORMAL, - PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0); + PR_SetLogBuffering( 65500 ); + thread = PR_CreateThread( + PR_USER_THREAD, forked, (void*)argv[0], PR_PRIORITY_NORMAL, + PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0); PR_LogPrint("%s joining thread\n", argv[0]); UserLogStuff(); |