Exemple #1
0
/** \brief OS layer initialization
 *
 * \b os_osInit calls:
 * - \b os_sharedMemoryInit
 * - \b os_threadInit
 */
void os_osInit (void)
{
  os_uint32 initCount;

  initCount = pa_inc32_nv(&_ospl_osInitCount);

  if (initCount == 1) {
    os_mutexModuleInit();
    os_threadModuleInit();
    os_reportInit(OS_FALSE);
    /*os_processModuleInit();*/
#if ! LITE
    os_sharedMemoryInit();
#endif
  }

  return;
}
Exemple #2
0
/** \brief OS layer initialization
 *
 * \b os_osInit calls:
 * - \b os_sharedMemoryInit
 * - \b os_threadInit
 */
void os_osInit (void)
{
  os_uint32 initCount;

  initCount = pa_increment(&_ospl_osInitCount);

  if (initCount == 1) {
    os_mutexModuleInit();
    os_reportInit(OS_FALSE);
    /*os_processModuleInit();*/
    os_threadModuleInit();
    os_sharedMemoryInit();
  } else {
#ifndef NDEBUG
    OS_REPORT_1(OS_INFO, "os_osInit", 1,
                "OS-layer initialization called %d times", initCount);
#endif /* NDEBUG */
  }
  return;
}