hotspot/src/os/windows/vm/attachListener_windows.cpp
// preallocate the required number of operations
int Win32AttachListener::init() {
{- -------------------------------------------
(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.