forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable cross OS DBI build (dotnet#35021)
* Enable cross OS DBI build * Fix .gitignore * Fix Cross OS DBI compilation issues * Review feedback * Cleanup dummy/twowaypipe.cpp
- Loading branch information
Showing
7 changed files
with
102 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#include <windows.h> | ||
#include "twowaypipe.h" | ||
|
||
// This file contains a dummy implementation of the simple IPC mechanism - bidirectional named pipe. | ||
// It is used for the cross OS DBI where IPC is not supported. | ||
|
||
|
||
// Creates a server side of the pipe. | ||
// Id is used to create pipes names and uniquely identify the pipe on the machine. | ||
// true - success, false - failure (use GetLastError() for more details) | ||
bool TwoWayPipe::CreateServer(const ProcessDescriptor& pd) | ||
{ | ||
return false; | ||
} | ||
|
||
|
||
// Connects to a previously opened server side of the pipe. | ||
// Id is used to locate the pipe on the machine. | ||
// true - success, false - failure (use GetLastError() for more details) | ||
bool TwoWayPipe::Connect(const ProcessDescriptor& pd) | ||
{ | ||
return false; | ||
} | ||
|
||
// Waits for incoming client connections, assumes GetState() == Created | ||
// true - success, false - failure (use GetLastError() for more details) | ||
bool TwoWayPipe::WaitForConnection() | ||
{ | ||
return false; | ||
} | ||
|
||
// Reads data from pipe. Returns number of bytes read or a negative number in case of an error. | ||
// use GetLastError() for more details | ||
int TwoWayPipe::Read(void *buffer, DWORD bufferSize) | ||
{ | ||
return -1; | ||
} | ||
|
||
// Writes data to pipe. Returns number of bytes written or a negative number in case of an error. | ||
// use GetLastError() for more details | ||
int TwoWayPipe::Write(const void *data, DWORD dataSize) | ||
{ | ||
return -1; | ||
} | ||
|
||
// Disconnect server or client side of the pipe. | ||
// true - success, false - failure (use GetLastError() for more details) | ||
bool TwoWayPipe::Disconnect() | ||
{ | ||
return false; | ||
} | ||
|
||
// Connects to a one sided pipe previously created by CreateOneWayPipe. | ||
// In order to successfully connect id and inbound flag should be the same. | ||
HANDLE TwoWayPipe::OpenOneWayPipe(DWORD id, bool inbound) | ||
{ | ||
return NULL; | ||
} | ||
|
||
|
||
// Creates a one way pipe, id and inboud flag are used for naming. | ||
// Created pipe is supposed to be connected to by OpenOneWayPipe. | ||
HANDLE TwoWayPipe::CreateOneWayPipe(DWORD id, bool inbound) | ||
{ | ||
return NULL; | ||
} | ||
|
||
// Used by debugger side (RS) to cleanup the target (LS) named pipes | ||
// and semaphores when the debugger detects the debuggee process exited. | ||
void TwoWayPipe::CleanupTargetProcess() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters