diff options
| author | 2014-12-08 23:52:27 -0500 | |
|---|---|---|
| committer | 2014-12-31 10:51:44 -0500 | |
| commit | 97a7381d29b69dbe760598e70669c16573304ad4 (patch) | |
| tree | f4e336af1e5cf5d72c2665470a96a9db73711ae7 /src/core/hle/svc.cpp | |
| parent | Merge pull request #375 from lioncash/uops (diff) | |
| download | yuzu-97a7381d29b69dbe760598e70669c16573304ad4.tar.gz yuzu-97a7381d29b69dbe760598e70669c16573304ad4.tar.xz yuzu-97a7381d29b69dbe760598e70669c16573304ad4.zip | |
SOC_U: Preliminary implementation of sockets.
Stubbed CreateMemoryBlock
Using Berkeley sockets, and Winsock2.2 on Windows.
So far ftpony creates the socket and accepts incoming connections
SOC_U: Renamed functions to maintain consistency
Also prevents possible scope errors / conflicts with the actual Berkeley socket functions
SOCU: Close all the opened sockets when cleaning up SOCU
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 25944fc68..c25409a9f 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -352,6 +352,18 @@ static s64 GetSystemTick() { | |||
| 352 | return (s64)Core::g_app_core->GetTicks(); | 352 | return (s64)Core::g_app_core->GetTicks(); |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | /// Creates a memory block at the specified address with the specified permissions and size | ||
| 356 | static Result CreateMemoryBlock(Handle* memblock, u32 addr, u32 size, u32 my_permission, | ||
| 357 | u32 other_permission) { | ||
| 358 | |||
| 359 | // TODO(Subv): Implement this function | ||
| 360 | |||
| 361 | Handle shared_memory = Kernel::CreateSharedMemory(); | ||
| 362 | *memblock = shared_memory; | ||
| 363 | LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%08X", addr); | ||
| 364 | return 0; | ||
| 365 | } | ||
| 366 | |||
| 355 | const HLE::FunctionDef SVC_Table[] = { | 367 | const HLE::FunctionDef SVC_Table[] = { |
| 356 | {0x00, nullptr, "Unknown"}, | 368 | {0x00, nullptr, "Unknown"}, |
| 357 | {0x01, HLE::Wrap<ControlMemory>, "ControlMemory"}, | 369 | {0x01, HLE::Wrap<ControlMemory>, "ControlMemory"}, |
| @@ -383,7 +395,7 @@ const HLE::FunctionDef SVC_Table[] = { | |||
| 383 | {0x1B, nullptr, "SetTimer"}, | 395 | {0x1B, nullptr, "SetTimer"}, |
| 384 | {0x1C, nullptr, "CancelTimer"}, | 396 | {0x1C, nullptr, "CancelTimer"}, |
| 385 | {0x1D, nullptr, "ClearTimer"}, | 397 | {0x1D, nullptr, "ClearTimer"}, |
| 386 | {0x1E, nullptr, "CreateMemoryBlock"}, | 398 | {0x1E, HLE::Wrap<CreateMemoryBlock>, "CreateMemoryBlock"}, |
| 387 | {0x1F, HLE::Wrap<MapMemoryBlock>, "MapMemoryBlock"}, | 399 | {0x1F, HLE::Wrap<MapMemoryBlock>, "MapMemoryBlock"}, |
| 388 | {0x20, nullptr, "UnmapMemoryBlock"}, | 400 | {0x20, nullptr, "UnmapMemoryBlock"}, |
| 389 | {0x21, HLE::Wrap<CreateAddressArbiter>, "CreateAddressArbiter"}, | 401 | {0x21, HLE::Wrap<CreateAddressArbiter>, "CreateAddressArbiter"}, |