/* Terminates the critical section module. Should be called once critical sections are no longer needed. Typically called from another module's termination function that also initialized it. It is okay to call this termination multiple times from different modules.  */
void UtilCriticalSectionTerminate(void)
/* Terminates the critical section module. Should be called once critical sections are no longer needed. Typically called from another module's termination function that also initialized it. It is okay to call this termination multiple times from different modules.  */
void UtilCriticalSectionTerminate(void)
{
  if (criticalSectionInitialized)
  {
    criticalSectionInitialized = false;
    (void)pthread_mutex_destroy((pthread_mutex_t *)&mtxCritSect);
  }
}