mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 08:22:04 +00:00
kern: assert correctness for complete class hierarchy
This commit is contained in:
parent
a4e3eae4b6
commit
35c1959131
1 changed files with 21 additions and 21 deletions
|
@ -26,10 +26,10 @@ namespace ams::kern {
|
||||||
static_assert(ClassToken<KInterruptEvent> == 0b00000111'00000011);
|
static_assert(ClassToken<KInterruptEvent> == 0b00000111'00000011);
|
||||||
static_assert(ClassToken<KDebug> == 0b00001011'00000001);
|
static_assert(ClassToken<KDebug> == 0b00001011'00000001);
|
||||||
static_assert(ClassToken<KThread> == 0b00010011'00000001);
|
static_assert(ClassToken<KThread> == 0b00010011'00000001);
|
||||||
/* TODO: static_assert(ClassToken<KServerPort> == 0b00100011'00000001); */
|
static_assert(ClassToken<KServerPort> == 0b00100011'00000001);
|
||||||
/* TODO: static_assert(ClassToken<KServerSession> == 0b01000011'00000001); */
|
static_assert(ClassToken<KServerSession> == 0b01000011'00000001);
|
||||||
/* TODO: static_assert(ClassToken<KClientPort> == 0b10000011'00000001); */
|
static_assert(ClassToken<KClientPort> == 0b10000011'00000001);
|
||||||
/* TODO: static_assert(ClassToken<KClientSession> == 0b00001101'00000000); */
|
static_assert(ClassToken<KClientSession> == 0b00001101'00000000);
|
||||||
static_assert(ClassToken<KProcess> == 0b00010101'00000001);
|
static_assert(ClassToken<KProcess> == 0b00010101'00000001);
|
||||||
static_assert(ClassToken<KResourceLimit> == 0b00100101'00000000);
|
static_assert(ClassToken<KResourceLimit> == 0b00100101'00000000);
|
||||||
static_assert(ClassToken<KLightSession> == 0b01000101'00000000);
|
static_assert(ClassToken<KLightSession> == 0b01000101'00000000);
|
||||||
|
@ -37,9 +37,9 @@ namespace ams::kern {
|
||||||
static_assert(ClassToken<KSession> == 0b00011001'00000000);
|
static_assert(ClassToken<KSession> == 0b00011001'00000000);
|
||||||
static_assert(ClassToken<KSharedMemory> == 0b00101001'00000000);
|
static_assert(ClassToken<KSharedMemory> == 0b00101001'00000000);
|
||||||
static_assert(ClassToken<KEvent> == 0b01001001'00000000);
|
static_assert(ClassToken<KEvent> == 0b01001001'00000000);
|
||||||
/* TODO: static_assert(ClassToken<KWritableEvent> == 0b10001001'00000000); */
|
static_assert(ClassToken<KWritableEvent> == 0b10001001'00000000);
|
||||||
/* TODO: static_assert(ClassToken<KLightClientSession> == 0b00110001'00000000); */
|
static_assert(ClassToken<KLightClientSession> == 0b00110001'00000000);
|
||||||
/* TODO: static_assert(ClassToken<KLightServerSession> == 0b01010001'00000000); */
|
static_assert(ClassToken<KLightServerSession> == 0b01010001'00000000);
|
||||||
static_assert(ClassToken<KTransferMemory> == 0b10010001'00000000);
|
static_assert(ClassToken<KTransferMemory> == 0b10010001'00000000);
|
||||||
static_assert(ClassToken<KDeviceAddressSpace> == 0b01100001'00000000);
|
static_assert(ClassToken<KDeviceAddressSpace> == 0b01100001'00000000);
|
||||||
static_assert(ClassToken<KSessionRequest> == 0b10100001'00000000);
|
static_assert(ClassToken<KSessionRequest> == 0b10100001'00000000);
|
||||||
|
@ -56,10 +56,10 @@ namespace ams::kern {
|
||||||
static_assert(ClassToken<KInterruptEvent> == ((0b00000111 << 8) | ClassToken<KReadableEvent>));
|
static_assert(ClassToken<KInterruptEvent> == ((0b00000111 << 8) | ClassToken<KReadableEvent>));
|
||||||
static_assert(ClassToken<KDebug> == ((0b00001011 << 8) | ClassToken<KSynchronizationObject>));
|
static_assert(ClassToken<KDebug> == ((0b00001011 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
static_assert(ClassToken<KThread> == ((0b00010011 << 8) | ClassToken<KSynchronizationObject>));
|
static_assert(ClassToken<KThread> == ((0b00010011 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
/* TODO: static_assert(ClassToken<KServerPort> == ((0b00100011 << 8) | ClassToken<KSynchronizationObject>)); */
|
static_assert(ClassToken<KServerPort> == ((0b00100011 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
/* TODO: static_assert(ClassToken<KServerSession> == ((0b01000011 << 8) | ClassToken<KSynchronizationObject>)); */
|
static_assert(ClassToken<KServerSession> == ((0b01000011 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
/* TODO: static_assert(ClassToken<KClientPort> == ((0b10000011 << 8) | ClassToken<KSynchronizationObject>)); */
|
static_assert(ClassToken<KClientPort> == ((0b10000011 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
/* TODO: static_assert(ClassToken<KClientSession> == ((0b00001101 << 8) | ClassToken<KAutoObject>)); */
|
static_assert(ClassToken<KClientSession> == ((0b00001101 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KProcess> == ((0b00010101 << 8) | ClassToken<KSynchronizationObject>));
|
static_assert(ClassToken<KProcess> == ((0b00010101 << 8) | ClassToken<KSynchronizationObject>));
|
||||||
static_assert(ClassToken<KResourceLimit> == ((0b00100101 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KResourceLimit> == ((0b00100101 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KLightSession> == ((0b01000101 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KLightSession> == ((0b01000101 << 8) | ClassToken<KAutoObject>));
|
||||||
|
@ -67,9 +67,9 @@ namespace ams::kern {
|
||||||
static_assert(ClassToken<KSession> == ((0b00011001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KSession> == ((0b00011001 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KSharedMemory> == ((0b00101001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KSharedMemory> == ((0b00101001 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KEvent> == ((0b01001001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KEvent> == ((0b01001001 << 8) | ClassToken<KAutoObject>));
|
||||||
/* TODO: static_assert(ClassToken<KWritableEvent> == ((0b10001001 << 8) | ClassToken<KAutoObject>)); */
|
static_assert(ClassToken<KWritableEvent> == ((0b10001001 << 8) | ClassToken<KAutoObject>));
|
||||||
/* TODO: static_assert(ClassToken<KLightClientSession> == ((0b00110001 << 8) | ClassToken<KAutoObject>)); */
|
static_assert(ClassToken<KLightClientSession> == ((0b00110001 << 8) | ClassToken<KAutoObject>));
|
||||||
/* TODO: static_assert(ClassToken<KLightServerSession> == ((0b01010001 << 8) | ClassToken<KAutoObject>)); */
|
static_assert(ClassToken<KLightServerSession> == ((0b01010001 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KTransferMemory> == ((0b10010001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KTransferMemory> == ((0b10010001 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KDeviceAddressSpace> == ((0b01100001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KDeviceAddressSpace> == ((0b01100001 << 8) | ClassToken<KAutoObject>));
|
||||||
static_assert(ClassToken<KSessionRequest> == ((0b10100001 << 8) | ClassToken<KAutoObject>));
|
static_assert(ClassToken<KSessionRequest> == ((0b10100001 << 8) | ClassToken<KAutoObject>));
|
||||||
|
@ -85,10 +85,10 @@ namespace ams::kern {
|
||||||
static_assert(std::is_final<KInterruptEvent>::value && std::is_base_of<KReadableEvent, KInterruptEvent>::value);
|
static_assert(std::is_final<KInterruptEvent>::value && std::is_base_of<KReadableEvent, KInterruptEvent>::value);
|
||||||
static_assert(std::is_final<KDebug>::value && std::is_base_of<KSynchronizationObject, KDebug>::value);
|
static_assert(std::is_final<KDebug>::value && std::is_base_of<KSynchronizationObject, KDebug>::value);
|
||||||
static_assert(std::is_final<KThread>::value && std::is_base_of<KSynchronizationObject, KThread>::value);
|
static_assert(std::is_final<KThread>::value && std::is_base_of<KSynchronizationObject, KThread>::value);
|
||||||
/* TODO: static_assert(std::is_final<KServerPort>::value && std::is_base_of<KSynchronizationObject, KServerPort>::value); */
|
static_assert(std::is_final<KServerPort>::value && std::is_base_of<KSynchronizationObject, KServerPort>::value);
|
||||||
/* TODO: static_assert(std::is_final<KServerSession>::value && std::is_base_of<KSynchronizationObject, KServerSession>::value); */
|
static_assert(std::is_final<KServerSession>::value && std::is_base_of<KSynchronizationObject, KServerSession>::value);
|
||||||
/* TODO: static_assert(std::is_final<KClientPort>::value && std::is_base_of<KSynchronizationObject, KClientPort>::value); */
|
static_assert(std::is_final<KClientPort>::value && std::is_base_of<KSynchronizationObject, KClientPort>::value);
|
||||||
/* TODO: static_assert(std::is_final<KClientSession>::value && std::is_base_of<KAutoObject, KClientSession>::value); */
|
static_assert(std::is_final<KClientSession>::value && std::is_base_of<KAutoObject, KClientSession>::value);
|
||||||
static_assert(std::is_final<KProcess>::value && std::is_base_of<KSynchronizationObject, KProcess>::value);
|
static_assert(std::is_final<KProcess>::value && std::is_base_of<KSynchronizationObject, KProcess>::value);
|
||||||
static_assert(std::is_final<KResourceLimit>::value && std::is_base_of<KAutoObject, KResourceLimit>::value);
|
static_assert(std::is_final<KResourceLimit>::value && std::is_base_of<KAutoObject, KResourceLimit>::value);
|
||||||
static_assert(std::is_final<KLightSession>::value && std::is_base_of<KAutoObject, KLightSession>::value);
|
static_assert(std::is_final<KLightSession>::value && std::is_base_of<KAutoObject, KLightSession>::value);
|
||||||
|
@ -96,9 +96,9 @@ namespace ams::kern {
|
||||||
static_assert(std::is_final<KSession>::value && std::is_base_of<KAutoObject, KSession>::value);
|
static_assert(std::is_final<KSession>::value && std::is_base_of<KAutoObject, KSession>::value);
|
||||||
static_assert(std::is_final<KSharedMemory>::value && std::is_base_of<KAutoObject, KSharedMemory>::value);
|
static_assert(std::is_final<KSharedMemory>::value && std::is_base_of<KAutoObject, KSharedMemory>::value);
|
||||||
static_assert(std::is_final<KEvent>::value && std::is_base_of<KAutoObject, KEvent>::value);
|
static_assert(std::is_final<KEvent>::value && std::is_base_of<KAutoObject, KEvent>::value);
|
||||||
/* TODO: static_assert(std::is_final<KWritableEvent>::value && std::is_base_of<KAutoObject, KWritableEvent>::value); */
|
static_assert(std::is_final<KWritableEvent>::value && std::is_base_of<KAutoObject, KWritableEvent>::value);
|
||||||
/* TODO: static_assert(std::is_final<KLightClientSession>::value && std::is_base_of<KAutoObject, KLightClientSession>::value); */
|
static_assert(std::is_final<KLightClientSession>::value && std::is_base_of<KAutoObject, KLightClientSession>::value);
|
||||||
/* TODO: static_assert(std::is_final<KLightServerSession>::value && std::is_base_of<KAutoObject, KLightServerSession>::value); */
|
static_assert(std::is_final<KLightServerSession>::value && std::is_base_of<KAutoObject, KLightServerSession>::value);
|
||||||
static_assert(std::is_final<KTransferMemory>::value && std::is_base_of<KAutoObject, KTransferMemory>::value);
|
static_assert(std::is_final<KTransferMemory>::value && std::is_base_of<KAutoObject, KTransferMemory>::value);
|
||||||
static_assert(std::is_final<KDeviceAddressSpace>::value && std::is_base_of<KAutoObject, KDeviceAddressSpace>::value);
|
static_assert(std::is_final<KDeviceAddressSpace>::value && std::is_base_of<KAutoObject, KDeviceAddressSpace>::value);
|
||||||
static_assert(std::is_final<KSessionRequest>::value && std::is_base_of<KAutoObject, KSessionRequest>::value);
|
static_assert(std::is_final<KSessionRequest>::value && std::is_base_of<KAutoObject, KSessionRequest>::value);
|
||||||
|
|
Loading…
Reference in a new issue