summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-19 00:12:29 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-19 00:12:29 +0200
commit772abad77803809d8ee857efc0d7e29c36c6b2cb (patch)
tree452ad8bdd41fcb5d69764f2c607ad3f9b7e0297c /src/core/hle
parent- added stub for CreateEvent (diff)
downloadyuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar.gz
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar.bz2
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar.lz
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar.xz
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.tar.zst
yuzu-772abad77803809d8ee857efc0d7e29c36c6b2cb.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/kernel.h3
-rw-r--r--src/core/hle/kernel/thread.cpp2
-rw-r--r--src/core/hle/service/service.h12
-rw-r--r--src/core/hle/service/srv.cpp2
-rw-r--r--src/core/hle/service/srv.h2
-rw-r--r--src/core/hle/syscall.h12
6 files changed, 19 insertions, 14 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 2608eecc9..d4bb28c72 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -6,7 +6,8 @@
#include "common/common_types.h"
-typedef s32 Handle;
+typedef u32 Handle;
+typedef s32 Result;
enum KernelIDType {
KERNEL_ID_TYPE_THREAD = 1,
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index d0bc9c8d8..634218e8b 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -42,8 +42,6 @@ enum WaitType {
WAITTYPE_SYNCH,
};
-typedef s32 Handle;
-
class Thread : public KernelObject {
public:
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index b260a290a..026e3d5de 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -11,6 +11,8 @@
#include "common/common.h"
#include "common/common_types.h"
#include "core/mem_map.h"
+
+#include "core/hle/kernel/kernel.h"
#include "core/hle/syscall.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -70,14 +72,14 @@ public:
}
/// Allocates a new handle for the service
- Syscall::Handle NewHandle() {
- Syscall::Handle handle = (m_handles.size() << 16) | m_uid;
+ Handle NewHandle() {
+ Handle handle = (m_handles.size() << 16) | m_uid;
m_handles.push_back(handle);
return handle;
}
/// Frees a handle from the service
- void DeleteHandle(Syscall::Handle handle) {
+ void DeleteHandle(Handle handle) {
for(auto iter = m_handles.begin(); iter != m_handles.end(); ++iter) {
if(*iter == handle) {
m_handles.erase(iter);
@@ -90,7 +92,7 @@ public:
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
* @return Return result of svcSendSyncRequest passed back to user app
*/
- Syscall::Result Sync() {
+ Result Sync() {
u32* cmd_buff = GetCommandBuffer();
auto itr = m_functions.find(cmd_buff[0]);
@@ -124,7 +126,7 @@ protected:
private:
u32 m_uid;
- std::vector<Syscall::Handle> m_handles;
+ std::vector<Handle> m_handles;
std::map<u32, FunctionInfo> m_functions;
};
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 303a943d4..a3d041176 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -23,7 +23,7 @@ void GetProcSemaphore(Service::Interface* self) {
}
void GetServiceHandle(Service::Interface* self) {
- Syscall::Result res = 0;
+ Result res = 0;
u32* cmd_buff = Service::GetCommandBuffer();
std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize);
diff --git a/src/core/hle/service/srv.h b/src/core/hle/service/srv.h
index 760c976b4..f465ebc06 100644
--- a/src/core/hle/service/srv.h
+++ b/src/core/hle/service/srv.h
@@ -30,7 +30,7 @@ public:
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
* @return Return result of svcSendSyncRequest passed back to user app
*/
- Syscall::Result Sync();
+ Result Sync();
};
diff --git a/src/core/hle/syscall.h b/src/core/hle/syscall.h
index 17f190266..3da349ed5 100644
--- a/src/core/hle/syscall.h
+++ b/src/core/hle/syscall.h
@@ -7,7 +7,7 @@
#include "common/common_types.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
-// SVC structures
+// SVC types
struct MemoryInfo {
u32 base_address;
@@ -31,14 +31,18 @@ struct ThreadContext {
u32 fpexc;
};
+enum ResetType {
+ RESETTYPE_ONESHOT,
+ RESETTYPE_STICKY,
+ RESETTYPE_PULSE,
+ RESETTYPE_MAX_BIT = (1u << 31),
+};
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace Syscall
namespace Syscall {
-typedef u32 Handle;
-typedef s32 Result;
-
void Register();
} // namespace