New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] TAP Win32 rewrite #2869
[WIP] TAP Win32 rewrite #2869
Conversation
Now closely resembles the unix implementation Code can be merged into a shared base later
@@ -242,19 +263,19 @@ bool CEXIETHERNET::IsActivated() | |||
|
|||
bool CEXIETHERNET::SendFrame(u8 *frame, u32 size) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
…on all build types.
} | ||
|
||
// Always report the packet as being sent successfully, even though it might be a lie | ||
SendComplete(); | ||
|
||
INFO_LOG(SP1, "SendFrame complete"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh, you replaced Windows overlapped events with a busy waiting thread? Overall this is a -1 from me... |
Yes, because this is exactly how the unix version does it. Also the read will have it block, so its not consuming all cpu. |
DWORD mMtu; | ||
OVERLAPPED mReadOverlapped; | ||
static VOID CALLBACK ReadWaitCallback(PVOID lpParameter, BOOLEAN TimerFired); | ||
HANDLE mHAdapter, mHReadEvent, mHWriteEvent; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
…one at the same time.
ZeroMemory(&mWriteOverlapped, sizeof(mWriteOverlapped)); | ||
mWriteOverlapped.hEvent = mHWriteEvent; | ||
|
||
// Start early so we can get all those pestky |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
…in thread. Tweak packet read timeout (not happy with this, needs a better solution)
No longer going to bother with window's horrible wait of reading and writing devices. If anyone wants to give this a try, give me a poke and ill share my gained knowledge thus far. |
Now closely resembles the unix implementation
Code can be merged into a shared base later