Kernel: replace boost::intrusive_ptr with std::shared_ptr
This commit is contained in:
parent
c1de8acfe5
commit
5f11c5f733
96 changed files with 522 additions and 538 deletions
|
@ -568,7 +568,7 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
|||
// 'Official user processes create a new event handle which is then passed to this command.
|
||||
// However, those user processes don't save that handle anywhere afterwards.'
|
||||
// So we don't save/use that event too.
|
||||
Kernel::SharedPtr<Kernel::Event> input_event = rp.PopObject<Kernel::Event>();
|
||||
std::shared_ptr<Kernel::Event> input_event = rp.PopObject<Kernel::Event>();
|
||||
|
||||
Kernel::MappedBuffer out_buffer = rp.PopMappedBuffer();
|
||||
ASSERT(out_buffer.GetSize() == out_buffer_size);
|
||||
|
@ -615,9 +615,9 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
|||
out_buffer_size, wlan_comm_id, id, unk1, unk2, cur_buffer_size);
|
||||
}
|
||||
|
||||
ResultVal<Kernel::SharedPtr<Kernel::Event>> NWM_UDS::Initialize(
|
||||
ResultVal<std::shared_ptr<Kernel::Event>> NWM_UDS::Initialize(
|
||||
u32 sharedmem_size, const NodeInfo& node, u16 version,
|
||||
Kernel::SharedPtr<Kernel::SharedMemory> sharedmem) {
|
||||
std::shared_ptr<Kernel::SharedMemory> sharedmem) {
|
||||
|
||||
current_node = node;
|
||||
initialized = true;
|
||||
|
@ -1179,9 +1179,9 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id,
|
|||
static constexpr std::chrono::nanoseconds UDSConnectionTimeout{300000000};
|
||||
|
||||
connection_event = ctx.SleepClientThread(
|
||||
system.Kernel().GetThreadManager().GetCurrentThread(), "uds::ConnectToNetwork",
|
||||
UDSConnectionTimeout,
|
||||
[command_id](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
||||
Kernel::SharedFrom(system.Kernel().GetThreadManager().GetCurrentThread()),
|
||||
"uds::ConnectToNetwork", UDSConnectionTimeout,
|
||||
[command_id](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
||||
Kernel::ThreadWakeupReason reason) {
|
||||
// TODO(B3N30): Add error handling for host full and timeout
|
||||
IPC::RequestBuilder rb(ctx, command_id, 1, 0);
|
||||
|
|
|
@ -416,9 +416,9 @@ private:
|
|||
template <u16 command_id>
|
||||
void DecryptBeaconData(Kernel::HLERequestContext& ctx);
|
||||
|
||||
ResultVal<Kernel::SharedPtr<Kernel::Event>> Initialize(
|
||||
ResultVal<std::shared_ptr<Kernel::Event>> Initialize(
|
||||
u32 sharedmem_size, const NodeInfo& node, u16 version,
|
||||
Kernel::SharedPtr<Kernel::SharedMemory> sharedmem);
|
||||
std::shared_ptr<Kernel::SharedMemory> sharedmem);
|
||||
|
||||
ResultCode BeginHostingNetwork(const u8* network_info_buffer, std::size_t network_info_size,
|
||||
std::vector<u8> passphrase);
|
||||
|
@ -477,11 +477,11 @@ private:
|
|||
boost::optional<Network::MacAddress> GetNodeMacAddress(u16 dest_node_id, u8 flags);
|
||||
|
||||
// Event that is signaled every time the connection status changes.
|
||||
Kernel::SharedPtr<Kernel::Event> connection_status_event;
|
||||
std::shared_ptr<Kernel::Event> connection_status_event;
|
||||
|
||||
// Shared memory provided by the application to store the receive buffer.
|
||||
// This is not currently used.
|
||||
Kernel::SharedPtr<Kernel::SharedMemory> recv_buffer_memory;
|
||||
std::shared_ptr<Kernel::SharedMemory> recv_buffer_memory;
|
||||
|
||||
// Connection status of this 3DS.
|
||||
ConnectionStatus connection_status{};
|
||||
|
@ -503,7 +503,7 @@ private:
|
|||
u8 channel; ///< Channel that this bind node was bound to.
|
||||
u16 network_node_id; ///< Node id this bind node is associated with, only packets from this
|
||||
/// network node will be received.
|
||||
Kernel::SharedPtr<Kernel::Event> event; ///< Receive event for this bind node.
|
||||
std::shared_ptr<Kernel::Event> event; ///< Receive event for this bind node.
|
||||
std::deque<std::vector<u8>> received_packets; ///< List of packets received on this channel.
|
||||
};
|
||||
|
||||
|
@ -535,7 +535,7 @@ private:
|
|||
// network thread.
|
||||
std::mutex connection_status_mutex;
|
||||
|
||||
Kernel::SharedPtr<Kernel::Event> connection_event;
|
||||
std::shared_ptr<Kernel::Event> connection_event;
|
||||
|
||||
// Mutex to synchronize access to the list of received beacons between the emulation thread and
|
||||
// the network thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue