1
0
Fork 0
forked from suyu/suyu

SVC: Assert on unsupported CreateThread processor ID.

This commit is contained in:
bunnei 2015-04-09 22:55:18 -04:00
parent c077bcefa9
commit db4bd98bac

View file

@ -338,9 +338,15 @@ static ResultCode CreateThread(Handle* out_handle, s32 priority, u32 entry_point
ErrorSummary::InvalidArgument, ErrorLevel::Usage); ErrorSummary::InvalidArgument, ErrorLevel::Usage);
} }
if (processor_id > THREADPROCESSORID_MAX) { switch (processor_id) {
return ResultCode(ErrorDescription::OutOfRange, ErrorModule::Kernel, case THREADPROCESSORID_DEFAULT:
ErrorSummary::InvalidArgument, ErrorLevel::Permanent); case THREADPROCESSORID_0:
case THREADPROCESSORID_1:
break;
default:
// TODO(bunnei): Implement support for other processor IDs
ASSERT_MSG(false, "Unsupported thread processor ID: %d", processor_id);
break;
} }
CASCADE_RESULT(SharedPtr<Thread> thread, Kernel::Thread::Create( CASCADE_RESULT(SharedPtr<Thread> thread, Kernel::Thread::Create(