Kernel/SVC: Implemented svcCreatePort.

This commit is contained in:
Subv 2016-05-22 12:30:13 -05:00
parent 3d9fbffbab
commit 7b445ddff0
6 changed files with 41 additions and 3 deletions

View file

@ -12,6 +12,8 @@
namespace Kernel {
class ServerPort;
class ClientPort : public Object {
public:
friend class ServerPort;

View file

@ -35,7 +35,7 @@ enum KernelHandle : Handle {
enum class HandleType : u32 {
Unknown = 0,
ServerPort = 1,
Session = 2,
Event = 3,
Mutex = 4,
@ -49,6 +49,7 @@ enum class HandleType : u32 {
ResourceLimit = 12,
CodeSet = 13,
ClientPort = 14,
ServerPort = 15,
};
enum {

View file

@ -2,8 +2,11 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <tuple>
#include "common/assert.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/server_port.h"
#include "core/hle/kernel/thread.h"

View file

@ -5,6 +5,7 @@
#pragma once
#include <string>
#include <tuple>
#include "common/common_types.h"
@ -12,10 +13,12 @@
namespace Kernel {
class ClientPort;
class ServerPort final : public WaitObject {
public:
/**
* Creates a pair of a ServerPort and an associated ClientPort.
* Creates a pair of ServerPort and an associated ClientPort.
* @param max_sessions Maximum number of sessions to the port
* @param name Optional name of the ports
* @return The created port tuple