kernel/timer: Make data members private where applicable

Instead, we can just expose functions that return the queryable state
instead of letting anything modify it.
This commit is contained in:
Lioncash 2018-07-26 09:45:18 -04:00 committed by zhupengfei
parent 4a3c4f5f67
commit 8e103d0675
No known key found for this signature in database
GPG key ID: 85B82A3E62174206
3 changed files with 23 additions and 10 deletions

View file

@ -981,8 +981,9 @@ static ResultCode ClearEvent(Handle handle) {
/// Creates a timer
static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) {
SharedPtr<Timer> timer = Timer::Create(static_cast<ResetType>(reset_type));
timer->name = Common::StringFromFormat("timer-%08x", Core::CPU().GetReg(14));
SharedPtr<Timer> timer =
Timer::Create(static_cast<ResetType>(reset_type),
Common::StringFromFormat("timer-%08x", Core::CPU().GetReg(14)));
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(timer)));
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,