forked from elasota/Aerofoil
-
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.
- Loading branch information
Showing
26 changed files
with
2,922 additions
and
33 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
File renamed without changes.
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
#include "GpFiber_Win32.h" | ||
#include <new> | ||
|
||
GpFiber_Win32::GpFiber_Win32(LPVOID fiber) | ||
: m_fiber(fiber) | ||
{ | ||
} | ||
|
||
void GpFiber_Win32::YieldTo() | ||
{ | ||
SwitchToFiber(m_fiber); | ||
} | ||
|
||
void GpFiber_Win32::Destroy() | ||
#include <new> | ||
|
||
GpFiber_Win32::GpFiber_Win32(LPVOID fiber) | ||
: m_fiber(fiber) | ||
{ | ||
} | ||
|
||
void GpFiber_Win32::YieldTo(IGpFiber *toFiber) | ||
{ | ||
SwitchToFiber(static_cast<GpFiber_Win32*>(toFiber)->m_fiber); | ||
} | ||
|
||
void GpFiber_Win32::Destroy() | ||
{ | ||
this->~GpFiber_Win32(); | ||
free(this); | ||
} | ||
|
||
GpFiber_Win32::~GpFiber_Win32() | ||
{ | ||
DeleteFiber(m_fiber); | ||
{ | ||
DeleteFiber(m_fiber); | ||
} | ||
|
||
|
||
IGpFiber *GpFiber_Win32::Create(LPVOID fiber) | ||
{ | ||
void *storage = malloc(sizeof(GpFiber_Win32)); | ||
if (!storage) | ||
return nullptr; | ||
|
||
return new (storage) GpFiber_Win32(fiber); | ||
return new (storage) GpFiber_Win32(fiber); | ||
} |
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
Oops, something went wrong.