Changeset 79495 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Jul 3, 2019 12:52:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/thread-win.cpp
r76553 r79495 44 44 #include <iprt/log.h> 45 45 #include <iprt/mem.h> 46 #include <iprt/param.h> 46 47 #include "internal/thread.h" 47 48 #include "internal-r3-win.h" … … 265 266 266 267 /* 268 * If a stack size is given, make sure it's not a multiple of 64KB so that we 269 * get one or more pages for overflow protection. (ASSUMES 64KB alloc align.) 270 */ 271 unsigned cbStack = (unsigned)pThread->cbStack; 272 if (cbStack > 0 && RT_ALIGN_T(cbStack, _64K, unsigned) == cbStack) 273 cbStack += PAGE_SIZE; 274 275 /* 267 276 * Create the thread. 268 277 */ 269 278 pThread->hThread = (uintptr_t)INVALID_HANDLE_VALUE; 270 279 unsigned uThreadId = 0; 271 uintptr_t hThread = _beginthreadex(NULL, (unsigned)pThread->cbStack, rtThreadNativeMain, pThread, 0, &uThreadId);280 uintptr_t hThread = _beginthreadex(NULL, cbStack, rtThreadNativeMain, pThread, 0, &uThreadId); 272 281 if (hThread != 0 && hThread != ~0U) 273 282 {
Note:
See TracChangeset
for help on using the changeset viewer.