snapshot: refactor the fork-based stack initialization
authorBrian Norris <banorris@uci.edu>
Thu, 14 Jun 2012 22:31:44 +0000 (15:31 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 14 Jun 2012 22:41:39 +0000 (15:41 -0700)
commit8b76d39eff3f6e27d416123292641ae36f88ca06
tree5626b66fbc712dde5820521d1fc16071d66a908c
parent970ac635b9f28be87f037da33f1e8ac57b89fd47
snapshot: refactor the fork-based stack initialization

This complicated code block uses a getcontext()/setcontext() pair with an
'alreadySwapped' boolean (int) to perform basically the same functionality as
'swapcontext()'. Refactor this code to make it simpler.
snapshot.cc