Try sched_yield from "sched.h", that is created just for what you want to do.
If that doesn't work for whatever reason - try usleep(1) - That will yield at least 1 microsecond delay (may be more), which in turn triggers a context switch (if any thread is waiting).