Top


定義場所(file name)

hotspot/src/os/windows/vm/attachListener_windows.cpp

説明(description)

// preallocate the required number of operations

名前(function name)

int Win32AttachListener::init() {

本体部(body)

  {- -------------------------------------------
  (1) 
      ---------------------------------------- -}

      _mutex = (void*)::CreateMutex(NULL, FALSE, NULL);
      guarantee(_mutex != (HANDLE)NULL, "mutex creation failed");

      _wakeup = ::CreateSemaphore(NULL, 0, 1, NULL);
      guarantee(_wakeup != (HANDLE)NULL, "semaphore creation failed");

      set_head(NULL);
      set_tail(NULL);

      // preallocate a few operations
      set_available(NULL);
      for (int i=0; i<preallocate_count; i++) {
        Win32AttachOperation* op = new Win32AttachOperation();
        op->set_next(available());
        set_available(op);
      }

      return 0;
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.