summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-12-05 23:53:49 -0200
committerGravatar Yuri Kunde Schlesner2014-12-13 02:08:02 -0200
commit0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch)
tree40fee084c551bfb497e68181447298f862ea68ca /src/core/hle/kernel/kernel.h
parentImplement text path trimming for shorter paths. (diff)
downloadyuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip
Convert old logging calls to new logging macros
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r--src/core/hle/kernel/kernel.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 00a2228bf..00f9b57fc 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -57,7 +57,7 @@ public:
57 * @return True if the current thread should wait as a result of the sync 57 * @return True if the current thread should wait as a result of the sync
58 */ 58 */
59 virtual ResultVal<bool> SyncRequest() { 59 virtual ResultVal<bool> SyncRequest() {
60 ERROR_LOG(KERNEL, "(UNIMPLEMENTED)"); 60 LOG_ERROR(Kernel, "(UNIMPLEMENTED)");
61 return UnimplementedFunction(ErrorModule::Kernel); 61 return UnimplementedFunction(ErrorModule::Kernel);
62 } 62 }
63 63
@@ -65,7 +65,10 @@ public:
65 * Wait for kernel object to synchronize. 65 * Wait for kernel object to synchronize.
66 * @return True if the current thread should wait as a result of the wait 66 * @return True if the current thread should wait as a result of the wait
67 */ 67 */
68 virtual ResultVal<bool> WaitSynchronization() = 0; 68 virtual ResultVal<bool> WaitSynchronization() {
69 LOG_ERROR(Kernel, "(UNIMPLEMENTED)");
70 return UnimplementedFunction(ErrorModule::Kernel);
71 }
69}; 72};
70 73
71class ObjectPool : NonCopyable { 74class ObjectPool : NonCopyable {
@@ -92,13 +95,13 @@ public:
92 T* Get(Handle handle) { 95 T* Get(Handle handle) {
93 if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) { 96 if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) {
94 if (handle != 0) { 97 if (handle != 0) {
95 WARN_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); 98 LOG_ERROR(Kernel, "Bad object handle %08x", handle, handle);
96 } 99 }
97 return nullptr; 100 return nullptr;
98 } else { 101 } else {
99 Object* t = pool[handle - HANDLE_OFFSET]; 102 Object* t = pool[handle - HANDLE_OFFSET];
100 if (t->GetHandleType() != T::GetStaticHandleType()) { 103 if (t->GetHandleType() != T::GetStaticHandleType()) {
101 WARN_LOG(KERNEL, "Kernel: Wrong object type for %i (%08x)", handle, handle); 104 LOG_ERROR(Kernel, "Wrong object type for %08x", handle, handle);
102 return nullptr; 105 return nullptr;
103 } 106 }
104 return static_cast<T*>(t); 107 return static_cast<T*>(t);
@@ -109,7 +112,7 @@ public:
109 template <class T> 112 template <class T>
110 T *GetFast(Handle handle) { 113 T *GetFast(Handle handle) {
111 const Handle realHandle = handle - HANDLE_OFFSET; 114 const Handle realHandle = handle - HANDLE_OFFSET;
112 _dbg_assert_(KERNEL, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]); 115 _dbg_assert_(Kernel, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]);
113 return static_cast<T*>(pool[realHandle]); 116 return static_cast<T*>(pool[realHandle]);
114 } 117 }
115 118
@@ -130,8 +133,8 @@ public:
130 133
131 bool GetIDType(Handle handle, HandleType* type) const { 134 bool GetIDType(Handle handle, HandleType* type) const {
132 if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || 135 if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) ||
133 !occupied[handle - HANDLE_OFFSET]) { 136 !occupied[handle - HANDLE_OFFSET]) {
134 ERROR_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); 137 LOG_ERROR(Kernel, "Bad object handle %08X", handle, handle);
135 return false; 138 return false;
136 } 139 }
137 Object* t = pool[handle - HANDLE_OFFSET]; 140 Object* t = pool[handle - HANDLE_OFFSET];