PJ_DEF(void) pj_shutdown(void) { /* Only perform shutdown operation when 'initialized' reaches zero */ pj_assert(initialized > 0); if (--initialized != 0) return; /* Call atexit() functions */ while (atexit_count > 0) { (*atexit_func[atexit_count-1])(); --atexit_count; } /* Free exception ID */ if (PJ_NO_MEMORY_EXCEPTION != -1) { pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION); PJ_NO_MEMORY_EXCEPTION = -1; } /* Clear static variables */ pj_errno_clear_handlers(); PjSymbianOS *os = PjSymbianOS::Instance(); os->Shutdown(); }
/* * pj_shutdown(void) */ PJ_DEF(void) pj_shutdown() { int i; /* Call atexit() functions */ for (i=atexit_count-1; i>=0; --i) { (*atexit_func[i])(); } atexit_count = 0; /* Free exception ID */ if (PJ_NO_MEMORY_EXCEPTION != -1) { pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION); PJ_NO_MEMORY_EXCEPTION = -1; } #if PJ_HAS_THREADS /* Destroy PJLIB critical section */ pj_mutex_destroy(&critical_section); /* Free PJLIB TLS */ if (thread_tls_id != -1) { pj_thread_local_free(thread_tls_id); thread_tls_id = -1; } #endif /* Clear static variables */ pj_errno_clear_handlers(); }
/* * pj_shutdown(void) */ PJ_DEF(void) pj_shutdown() { int i; /* Only perform shutdown operation when 'initialized' reaches zero */ pj_assert(initialized > 0); if (--initialized != 0) return; /* Display stack usage */ #if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0 { pj_thread_t *rec = (pj_thread_t*)main_thread; PJ_LOG(5,(rec->obj_name, "Main thread stack max usage=%u by %s:%d", rec->stk_max_usage, rec->caller_file, rec->caller_line)); } #endif /* Call atexit() functions */ for (i=atexit_count-1; i>=0; --i) { (*atexit_func[i])(); } atexit_count = 0; /* Free exception ID */ if (PJ_NO_MEMORY_EXCEPTION != -1) { pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION); PJ_NO_MEMORY_EXCEPTION = -1; } /* Destroy PJLIB critical section */ pj_mutex_destroy(&critical_section_mutex); /* Free PJLIB TLS */ if (thread_tls_id != -1) { pj_thread_local_free(thread_tls_id); thread_tls_id = -1; } /* Clear static variables */ pj_errno_clear_handlers(); /* Ticket #1132: Assertion when (re)starting PJLIB on different thread */ pj_bzero(main_thread, sizeof(main_thread)); /* Shutdown Winsock */ WSACleanup(); }
PJ_DEF(void) pj_shutdown(void) { /* Call atexit() functions */ while (atexit_count > 0) { (*atexit_func[atexit_count-1])(); --atexit_count; } /* Free exception ID */ if (PJ_NO_MEMORY_EXCEPTION != -1) { pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION); PJ_NO_MEMORY_EXCEPTION = -1; } /* Clear static variables */ pj_errno_clear_handlers(); PjSymbianOS *os = PjSymbianOS::Instance(); os->Shutdown(); }
/* * pj_shutdown(void) */ PJ_DEF(void) pj_shutdown() { int i; /* Only perform shutdown operation when 'initialized' reaches zero */ pj_assert(initialized > 0); if (--initialized != 0) return; /* Call atexit() functions */ for (i=atexit_count-1; i>=0; --i) { (*atexit_func[i])(); } atexit_count = 0; /* Free exception ID */ if (PJ_NO_MEMORY_EXCEPTION != -1) { pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION); PJ_NO_MEMORY_EXCEPTION = -1; } #if PJ_HAS_THREADS /* Destroy PJLIB critical section */ pj_mutex_destroy(&critical_section); /* Free PJLIB TLS */ if (thread_tls_id != -1) { pj_thread_local_free(thread_tls_id); thread_tls_id = -1; } /* Ticket #1132: Assertion when (re)starting PJLIB on different thread */ pj_bzero(&main_thread, sizeof(main_thread)); #endif /* Clear static variables */ pj_errno_clear_handlers(); }