mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-07 01:42:30 +00:00
mutex scoped
This commit is contained in:
parent
aed5853242
commit
b1ae13f43b
@ -40,6 +40,7 @@ void RegisterNet(Core::Loader::SymbolsResolver* sym) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int NetPosixInternal::create_socket(int domain, int type, int protocol) {
|
int NetPosixInternal::create_socket(int domain, int type, int protocol) {
|
||||||
|
std::scoped_lock lock{m_mutex};
|
||||||
s_socket sock = socket(domain, type, protocol);
|
s_socket sock = socket(domain, type, protocol);
|
||||||
auto id = ++next_id;
|
auto id = ++next_id;
|
||||||
socks.emplace(id, sock);
|
socks.emplace(id, sock);
|
||||||
|
@ -18,8 +18,8 @@ typedef SOCKET s_socket;
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
typedef int s_socket;
|
typedef int s_socket;
|
||||||
#endif
|
#endif
|
||||||
#include <mutex>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
class NativeClock;
|
class NativeClock;
|
||||||
|
Loading…
Reference in New Issue
Block a user