Home | History | Annotate | Download | only in sched_yield
      1 /*
      2  *  This program is free software; you can redistribute it and/or modify
      3  *  it under the terms of the GNU General Public License version 2.
      4  *
      5  *  This program is distributed in the hope that it will be useful,
      6  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      7  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      8  *  GNU General Public License for more details.
      9  *
     10  *
     11  * Test that sched_yield() return 0 upon success.
     12  */
     13 #include <sched.h>
     14 #include <stdio.h>
     15 #include "posixtest.h"
     16 
     17 int main(void)
     18 {
     19 	if (sched_yield() == 0) {
     20 		printf("Test PASSED\n");
     21 		return PTS_PASS;
     22 	}
     23 
     24 	printf("sched_yield() does not return 0.\n");
     25 	return PTS_FAIL;
     26 }
     27