I'm no expert on this but I think raising e_sync is the same as calling e_start function which basically in C based languages sets up the runtime environment then executes main. So your core goes into main which then presumably calls the wait loop.
It might work better if you remove the wait code, load the program into the second core but don't run it, then the e_sync can start it when the first core is ready.
The experts can probably give you a better answer though and correct any mistakes I've made.
In particular is it possible to have core 2 waiting or idling and then get it to continue rather than reset. Would the signal interrupt be better? If so how do you use it properly?
Tim