Changeset 112


Ignore:
Timestamp:
Aug 24, 2010, 1:52:33 AM (15 years ago)
Author:
dmik
Message:

hotspot: Renamed os_os2.cpp to os_os2_init.cpp.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/hotspot/src/os/os2/vm/os_os2_init.cpp

    r92 r112  
    22 * Copyright 1997-2010 Sun Microsystems, Inc.  All Rights Reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 *
     5 * Copyright 2010 netlabs.org. OS/2 Parts.
    46 *
    57 * This code is free software; you can redistribute it and/or modify it
     
    2325 */
    2426
    25 // As the OS/2 platform currently reuses the Windows sources, here we only
    26 // redirect the OS/2 DLL initialization/termination calls to DllMain()
    27 
    28 #ifdef __WIN32OS2__
     27// This code redirects the OS/2 DLL initialization/termination calls to
     28// the Windows DllMain()
    2929
    3030#include <os2.h> // Odin32 OS/2 api wrappers
     
    4949unsigned long SYSTEM _DLL_InitTerm(unsigned long hModule, unsigned long ulFlag)
    5050{
    51   size_t i;
    52   APIRET rc;
     51    size_t i;
     52    APIRET rc;
    5353
    54   // If ulFlag is zero then the DLL is being loaded so initialization should
    55   // be performed.  If ulFlag is 1 then the DLL is being freed so termination
    56   // should be performed. A non-zero value must be returned to indicate success.
     54    // If ulFlag is zero then the DLL is being loaded so initialization should
     55    // be performed.  If ulFlag is 1 then the DLL is being freed so termination
     56    // should be performed. A non-zero value must be returned to indicate success.
    5757
    58   switch (ulFlag) {
    59   case 0 :
     58    switch (ulFlag) {
     59    case 0 :
    6060#ifdef __EMX__
    61     // initialize the C library
    62     if (_CRT_init())
    63       break;
    64     // initialize C++ statics
    65     __ctordtorInit();
     61        // initialize the C library
     62        if (_CRT_init())
     63          break;
     64        // initialize C++ statics
     65        __ctordtorInit();
    6666#else
    6767#  error "Add code to initialize C/C++ library of this compiler!"
    6868#endif
    6969
    70     // check that the runtime Odin version matches the compile time version
    71     // (this will issue a message box and abort the process on mismatch)
    72     CheckVersionFromHMOD(PE2LX_VERSION, hModule);
     70        // check that the runtime Odin version matches the compile time version
     71        // (this will issue a message box and abort the process on mismatch)
     72        CheckVersionFromHMOD(PE2LX_VERSION, hModule);
    7373
    74     // enable __try/__except support
    75     EnableSEH();
     74        // enable __try/__except support
     75        EnableSEH();
    7676
    77     dllHandle = RegisterLxDll(hModule, DllMain, NULL);
    78     if (dllHandle == 0)
    79       break;
     77        dllHandle = RegisterLxDll(hModule, DllMain, NULL);
     78        if (dllHandle == 0)
     79          break;
    8080
    81     return 1;
     81        return 1;
    8282
    83   case 1 :
    84     if (dllHandle) {
    85       UnregisterLxDll(dllHandle);
    86     }
     83    case 1 :
     84        if (dllHandle) {
     85          UnregisterLxDll(dllHandle);
     86        }
    8787#ifdef __EMX__
    88     // destroy C++ statics
    89     __ctordtorTerm();
    90     _CRT_term();
     88        // destroy C++ statics
     89        __ctordtorTerm();
     90        _CRT_term();
    9191#else
    9292#  error "Add code to initialize C/C++ library of this compiler!"
    9393#endif
     94        return 0;
     95
     96    default:
     97        break;
     98    }
     99
     100    // failure
    94101    return 0;
    95 
    96   default:
    97     break;
    98   }
    99 
    100   // failure
    101   return 0;
    102102}
    103103
    104 #endif // __WIN32OS2__
Note: See TracChangeset for help on using the changeset viewer.