commit x64 compilation from lulu cause the other branch dont seems to compile properly at home

This commit is contained in:
2026-07-17 16:08:20 +02:00
parent c0f3eeb00d
commit 0efa4ee6f7
625 changed files with 117283 additions and 4426 deletions

View File

@ -0,0 +1,76 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "io_net/io_net_server_thread.h"
#include "filesystem/io_cfile.h"
#include "platform.h"
#include "log/log.h"
using namespace GS::IO;
//------------------------------------------------------------------------------
void NetServerThread::Execute()
{
{
Threading::MutexLock lock(&server_mutex);
server = new NetServer(basefs);
}
if (server->Start(ip.c_str(), port))
for (state.Set(1); state.Get() != 2; )
{
{
Threading::MutexLock lock(&server_mutex);
server->UpdateHost();
}
Platform::Get().Sleep(1);
}
{
Threading::MutexLock lock(&server_mutex);
server = NULL;
}
state.Set(0);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool NetServerThread::Start(const char *_ip, int _port)
{
ip = _ip;
port = _port;
if (!Thread::Start())
return false;
while (state.Get() == 0)
;
return asbool(state.Get() != -1);
}
void NetServerThread::Stop()
{
state.Set(2);
while (state.Get() != 0); // spinlock
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void NetServerThread::GetStatistics(NetServer::Statistics &stats)
{
Threading::MutexLock lock(&server_mutex);
if (server.IsValid())
server->GetStatistics(stats);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
NetServerThread::~NetServerThread()
{
Stop();
}
//------------------------------------------------------------------------------