Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposed method for dealing with stack locals which have non-local li…
…fetime.
- Loading branch information
Showing
4 changed files
with
76 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* This file is part of the "Coroutine" project and released under the MIT License. | ||
* | ||
* Created by Samuel Williams on 10/11/2020. | ||
* Copyright, 2020, by Samuel Williams. | ||
*/ | ||
|
||
#include COROUTINE_H | ||
|
||
#ifdef COROUTINE_PRIVATE_STACK | ||
#define COROUTINE_STACK_LOCAL(type, name) type *name = ruby_xmalloc(sizeof(type)) | ||
#define COROUTINE_STACK_FREE(name) ruby_xfree(name) | ||
#else | ||
#define COROUTINE_STACK_LOCAL(type, name) type name##_local; type * name = &name##_local | ||
#define COROUTINE_STACK_FREE(name) | ||
#endif |
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