2020-04-19 23:04:05 +02:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2020-03-27 20:36:02 +01:00
|
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
|
|
|
2019-09-24 22:54:27 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-10-13 10:04:47 +02:00
|
|
|
#include <common.h>
|
2019-09-24 22:54:27 +02:00
|
|
|
#include "KObject.h"
|
|
|
|
|
|
|
|
namespace skyline::kernel::type {
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 21:09:31 +01:00
|
|
|
/**
|
|
|
|
* @brief KSyncObject holds the state of a waitable object
|
|
|
|
*/
|
2019-09-24 22:54:27 +02:00
|
|
|
class KSyncObject : public KObject {
|
|
|
|
public:
|
2020-01-11 05:52:25 +01:00
|
|
|
std::atomic<bool> signalled{false}; //!< If the current object is signalled (Used as object stays signalled till the signal is consumed)
|
2019-10-13 10:04:47 +02:00
|
|
|
|
2019-09-24 22:54:27 +02:00
|
|
|
/**
|
|
|
|
* @param state The state of the device
|
|
|
|
* @param type The type of the object
|
|
|
|
*/
|
2020-01-11 05:52:25 +01:00
|
|
|
KSyncObject(const DeviceState &state, skyline::kernel::type::KType type) : KObject(state, type) {};
|
2019-09-24 22:54:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief A function for calling when a particular KSyncObject is signalled
|
|
|
|
*/
|
2020-01-11 05:52:25 +01:00
|
|
|
virtual void Signal() {
|
|
|
|
signalled = true;
|
|
|
|
}
|
2019-09-24 22:54:27 +02:00
|
|
|
};
|
|
|
|
}
|