libstrat: fix compilation without pre-compiled header/without lto
This commit is contained in:
@@ -176,6 +176,7 @@ namespace ams::sf::hipc {
|
||||
virtual Server *AllocateServer() = 0;
|
||||
virtual void DestroyServer(Server *server) = 0;
|
||||
virtual Result OnNeedsToAccept(int port_index, Server *server) {
|
||||
AMS_UNUSED(port_index, server);
|
||||
AMS_ABORT("OnNeedsToAccept must be overridden when using indexed ports");
|
||||
}
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ namespace ams::sf::hipc {
|
||||
|
||||
virtual ServerSessionManager *GetSessionManagerByTag(u32 tag) {
|
||||
/* This is unused. */
|
||||
AMS_UNUSED(tag);
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -790,6 +790,7 @@ namespace ams::sf::impl {
|
||||
|
||||
virtual Result GetInObjects(cmif::ServiceObjectHolder *in_objects) const override final {
|
||||
/* By default, InObjects aren't supported. */
|
||||
AMS_UNUSED(in_objects);
|
||||
return sf::ResultNotSupported();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ams::sf {
|
||||
}
|
||||
|
||||
void Detach() {
|
||||
this->_handle = 0;
|
||||
this->_handle = {};
|
||||
}
|
||||
|
||||
void *Allocate(size_t size) {
|
||||
@@ -42,6 +42,8 @@ namespace ams::sf {
|
||||
}
|
||||
|
||||
void Deallocate(void *ptr, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
os::LockSdkMutex(std::addressof(this->_mutex));
|
||||
lmem::FreeToExpHeap(this->_handle, ptr);
|
||||
os::UnlockSdkMutex(std::addressof(this->_mutex));
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace ams::sf {
|
||||
}
|
||||
|
||||
virtual void DeallocateImpl(void *buffer, size_t size, size_t alignment) override {
|
||||
AMS_UNUSED(size, alignment);
|
||||
return lmem::FreeToExpHeap(this->handle, buffer);
|
||||
}
|
||||
|
||||
@@ -64,10 +65,14 @@ namespace ams::sf {
|
||||
virtual void *AllocateImpl(size_t size, size_t alignment) override {
|
||||
AMS_ASSERT(size <= lmem::GetUnitHeapUnitSize(this->handle));
|
||||
AMS_ASSERT(alignment <= static_cast<size_t>(lmem::GetUnitHeapAlignment(this->handle)));
|
||||
AMS_UNUSED(size, alignment);
|
||||
|
||||
return lmem::AllocateFromUnitHeap(this->handle);
|
||||
}
|
||||
|
||||
virtual void DeallocateImpl(void *buffer, size_t size, size_t alignment) override {
|
||||
AMS_UNUSED(size, alignment);
|
||||
|
||||
return lmem::FreeToUnitHeap(this->handle, buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace ams::sf {
|
||||
}
|
||||
|
||||
virtual void DeallocateImpl(void *buffer, size_t size, size_t alignment) override {
|
||||
AMS_UNUSED(size, alignment);
|
||||
return this->standard_allocator->Free(buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user