1
0
Fork 0
forked from suyu/suyu

Kernel Thread: Cleanup THREADPROCESSORID_DONT_UPDATE.

This commit is contained in:
Fernando Sahmkow 2019-10-12 10:55:34 -04:00 committed by FernandoS27
parent e28c7f5217
commit 64e652d8cb
2 changed files with 1 additions and 4 deletions

View file

@ -410,7 +410,7 @@ ResultCode Thread::SetCoreAndAffinityMask(s32 new_core, u64 new_affinity_mask) {
}; };
const bool use_override = affinity_override_count != 0; const bool use_override = affinity_override_count != 0;
if (new_core == THREADDONTCHANGE_IDEAL) { if (new_core == THREADPROCESSORID_DONT_UPDATE) {
new_core = use_override ? ideal_core_override : ideal_core; new_core = use_override ? ideal_core_override : ideal_core;
if ((new_affinity_mask & (1ULL << new_core)) == 0) { if ((new_affinity_mask & (1ULL << new_core)) == 0) {
return ERR_INVALID_COMBINATION; return ERR_INVALID_COMBINATION;

View file

@ -35,9 +35,6 @@ enum ThreadProcessorId : s32 {
/// Run thread on the ideal core specified by the process. /// Run thread on the ideal core specified by the process.
THREADPROCESSORID_IDEAL = -2, THREADPROCESSORID_IDEAL = -2,
/// when setting Core and Affiny, keeps the ideal core intact
THREADDONTCHANGE_IDEAL = -3,
/// Indicates that the preferred processor ID shouldn't be updated in /// Indicates that the preferred processor ID shouldn't be updated in
/// a core mask setting operation. /// a core mask setting operation.
THREADPROCESSORID_DONT_UPDATE = -3, THREADPROCESSORID_DONT_UPDATE = -3,