Ticket #2568: sched_yield-02.diff
File sched_yield-02.diff, 1.3 KB (added by , 16 years ago) |
---|
-
src/system/libroot/posix/Jamfile
21 21 inttypes.c 22 22 poll.c 23 23 $(PWD_BACKEND) 24 scheduler.cpp 24 25 semaphore.cpp 25 26 syslog.cpp 26 27 termios.c -
src/system/libroot/posix/scheduler.cpp
1 /* 2 * Copyright 2008, Andreas Färber, andreas.faerber@web.de 3 * Distributed under the terms of the MIT/X11 license. 4 */ 5 6 #include <sched.h> 7 8 #include <syscalls.h> 9 10 11 int 12 sched_yield(void) 13 { 14 _kern_thread_yield(); 15 return 0; 16 } 17 -
headers/posix/sched.h
1 /* 2 * Copyright 2008, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 */ 5 #ifndef _SCHED_H_ 6 #define _SCHED_H_ 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 13 extern int sched_yield(void); 14 15 16 #ifdef __cplusplus 17 } 18 #endif 19 20 #endif /* _SCHED_H_ */ 21