What is the alternative to pthread_yield call in NDK?

882 views
Skip to first unread message

vivekianjs

unread,
May 1, 2012, 7:42:40 PM5/1/12
to android-ndk
Hi,

I am trying to compile some preexisting code which makes a call to
pthread_yield, but apparently the call declaration is missing in
pthread.h provided along with the android ndk arm toolchain. What
would be the correct alternative to this call?

Thanks,
Vivekian

Steven Winston

unread,
May 3, 2012, 5:45:45 AM5/3/12
to andro...@googlegroups.com
http://www.kernel.org/doc/man-pages/online/pages/man2/sched_yield.2.html

That's the posix version of your desired call.

pps

unread,
May 5, 2012, 6:32:22 PM5/5/12
to andro...@googlegroups.com
This will work:

static __inline pthread_yield(){}


:)
Reply all
Reply to author
Forward
0 new messages