* Patch by Andreas that adds sched.h, and sched_yield() to Haiku.
* This closes ticket #2568. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26820 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008, Haiku Inc. All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT license.
|
||||||
|
*/
|
||||||
|
#ifndef _SCHED_H_
|
||||||
|
#define _SCHED_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int sched_yield(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _SCHED_H_ */
|
||||||
@@ -21,6 +21,7 @@ MergeObject posix_main.o :
|
|||||||
inttypes.c
|
inttypes.c
|
||||||
poll.c
|
poll.c
|
||||||
$(PWD_BACKEND)
|
$(PWD_BACKEND)
|
||||||
|
scheduler.cpp
|
||||||
semaphore.cpp
|
semaphore.cpp
|
||||||
syslog.cpp
|
syslog.cpp
|
||||||
termios.c
|
termios.c
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008, Andreas Färber, [email protected]
|
||||||
|
* Distributed under the terms of the MIT license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sched.h>
|
||||||
|
|
||||||
|
#include <syscalls.h>
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
sched_yield(void)
|
||||||
|
{
|
||||||
|
_kern_thread_yield();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user