News for hackers. Stuff that matters.
Re:Coroutines in C with Arbitrary Arguments by rumcajz on Sunday April 19, 2015 @06:16AM (#9402632)
It uses dynamically allocated array (char filler_[...]) to shift stack pointer to arbitrary memory address. If it doesn't work with your compiler you may try to use alloca() instead.
Re:Coroutines in C with Arbitrary Arguments by thechao on Sunday April 19, 2015 @05:24PM (#9404933)
Here's my implementation in c++, using alloca(): https://github.com/jaroslov/coro. Without debugger support, coroutines are pretty difficult to work with.
Re:Coroutines in C with Arbitrary Arguments by ehmmm on Sunday April 19, 2015 @06:30AM (#9402671)
Oh I see, it moves the stack pointer so it coincides with the heap allocated memory?

I like articles that combine hacking and C, but this one really needs more explanation.

Re:Coroutines in C with Arbitrary Arguments by rumcajz on Sunday April 19, 2015 @06:37AM (#9402684)
This article is really about the arguments to the coroutine. The original idea for shifting the stack pointer comes from here: http://fanf.livejournal.com/105413.html