Changeset 88810 in vbox
- Timestamp:
- May 1, 2021 1:05:17 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/req.h
r82968 r88810 332 332 /** The desired RTTHREADTYPE of the worker threads. */ 333 333 RTREQPOOLCFGVAR_THREAD_TYPE, 334 /** The RTTHREADFLAGS mask for the worker threads (not waitable). */ 335 RTREQPOOLCFGVAR_THREAD_FLAGS, 334 336 /** The minimum number of threads to keep handy once spawned. */ 335 337 RTREQPOOLCFGVAR_MIN_THREADS, -
trunk/src/VBox/Runtime/common/misc/reqpool.cpp
r82968 r88810 116 116 /** The worker thread type. */ 117 117 RTTHREADTYPE enmThreadType; 118 /** The work thread flags (RTTHREADFLAGS). */ 119 uint32_t fThreadFlags; 118 120 /** The maximum number of worker threads. */ 119 121 uint32_t cMaxThreads; … … 463 465 464 466 int rc = RTThreadCreateF(&pThread->hThread, rtReqPoolThreadProc, pThread, 0 /*default stack size*/, 465 pPool->enmThreadType, 0 /*fFlags*/, "%s%02u", pPool->szName, pPool->cThreadsCreated);467 pPool->enmThreadType, pPool->fThreadFlags, "%s%02u", pPool->szName, pPool->cThreadsCreated); 466 468 if (RT_SUCCESS(rc)) 467 469 pPool->uLastThreadCreateNanoTs = pThread->uBirthNanoTs; … … 658 660 return VERR_NO_MEMORY; 659 661 660 pPool->u32Magic = RTREQPOOL_MAGIC;662 pPool->u32Magic = RTREQPOOL_MAGIC; 661 663 RTStrCopy(pPool->szName, sizeof(pPool->szName), pszName); 662 664 663 665 pPool->enmThreadType = RTTHREADTYPE_DEFAULT; 666 pPool->fThreadFlags = 0; 664 667 pPool->cMaxThreads = cMaxThreads; 665 668 pPool->cMinThreads = cMinThreads; … … 731 734 break; 732 735 736 case RTREQPOOLCFGVAR_THREAD_FLAGS: 737 AssertMsgBreakStmt(!(uValue & ~(uint64_t)RTTHREADFLAGS_MASK) && !(uValue & RTTHREADFLAGS_WAITABLE), 738 ("%#llx\n", uValue), rc = VERR_INVALID_FLAGS); 739 740 pPool->fThreadFlags = (uint32_t)uValue; 741 break; 742 733 743 case RTREQPOOLCFGVAR_MIN_THREADS: 734 744 AssertMsgBreakStmt(uValue <= RTREQPOOL_MAX_THREADS, ("%llu\n", uValue), rc = VERR_OUT_OF_RANGE); … … 881 891 break; 882 892 893 case RTREQPOOLCFGVAR_THREAD_FLAGS: 894 u64 = pPool->fThreadFlags; 895 break; 896 883 897 case RTREQPOOLCFGVAR_MIN_THREADS: 884 898 u64 = pPool->cMinThreads;
Note:
See TracChangeset
for help on using the changeset viewer.