Esempio n. 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_increment(&_ospl_osInitCount);

    if(initCount == 1){
        os_sharedMemoryInit();
        os_threadModuleInit();
    } else {
        OS_REPORT_1(OS_INFO, "os_osInit", 1,
                "OS-layer initialization called %d times", initCount);
    }
    return;
}
Esempio n. 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_debugModeInit();
        os_timeModuleInit();
        os_processModuleInit();
        os_sharedMemoryInit();
        os_threadModuleInit();

    } /* Else initialization is already done. */
    return;
}
Esempio n. 3
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;
}
Esempio n. 4
0
/** \brief OS layer initialization
 *
 * \b os_osInit calls:
 * - \b os_sharedMemoryInit
 * - \b os_threadInit
 */
void
os_osInit (
    void)
{
    os_uint32 initCount;

    /* Sanity checks, don't remove, they don't generate any code anyway. */
    EXPRCHECK(sizeof(void *)==sizeof(os_os_uintptr))
    EXPRCHECK(sizeof(os_os_char)==1)
    EXPRCHECK(sizeof(os_os_uchar)==1)
    EXPRCHECK(sizeof(os_os_short)==2)
    EXPRCHECK(sizeof(os_os_ushort)==2)
    EXPRCHECK(sizeof(os_os_int32)==4)
    EXPRCHECK(sizeof(os_os_uint32)==4)
    EXPRCHECK(sizeof(os_os_int64)==8)
    EXPRCHECK(sizeof(os_os_uint64)==8)
    EXPRCHECK(sizeof(os_os_float)==4)
    EXPRCHECK(sizeof(os_os_double)==8)
    EXPRCHECK(sizeof(void *)==sizeof(os_os_address))
    EXPRCHECK(sizeof(void *)==sizeof(os_os_saddress))

    #if ! defined(__PPC) && ! defined(__x86_64__)
      /* Check for heap realignment code which relies */
      /* on types below being 32bit. */
       EXPRCHECK(sizeof(size_t)==4)
       EXPRCHECK(sizeof(void *)==4)
    #endif

    initCount = pa_inc32_nv(&_ospl_osInitCount);

    if (initCount == 1) {
        /* init for programs using data base threads */
        os_threadModuleInit();
        os_reportInit(OS_FALSE);
        os_procInitialize();
        os_stdlibInitialize();
        os_sharedMemoryInit();
    } else {
        os_procInitialize();
    }
    return;
}
Esempio n. 5
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;
}