1

I am trying to use makecontext()/swapcontext() to implement coroutines in my iPhone game. But those are deprecated. Is there any replacement function? Will my app be rejected by Apple if I use those functions even if it's deprecated?

Rachid K.
  • 4,490
  • 3
  • 11
  • 30
fbafelipe
  • 4,862
  • 2
  • 25
  • 40
  • Dit you already see [this stackoverflow discussion](http://stackoverflow.com/questions/4298986/is-there-something-to-replace-the-ucontext-h-functions)? It is not really iphone specific but talks about alternatives and the reason for its deprecation. – Steven Sep 20 '11 at 04:30
  • @Steven Thanks for the link, it is related, but not exacly what I am looking for. In my question I am looking for a replacement in iOS or at least know if Apple will reject my app if I use ucontext. – fbafelipe Sep 20 '11 at 04:50

1 Answers1

2

As a warning to anyone attempting to use ucontexts for iOS: getcontext, setcontext, swapcontext, makecontext are now all stubbed out to return ENOTSUP, so do not work on current iOS (5.1).

http://www.opensource.apple.com/source/Libc/Libc-763.13/sys/context-stubs.c?txt

Andrew Wright
  • 116
  • 1
  • 4