Added a real yield function to the kernel (using the next_priority approach).

The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-01-31 02:29:02 +00:00
parent d14af9fde6
commit 204131dc97
6 changed files with 75 additions and 15 deletions
+1
View File
@@ -96,6 +96,7 @@ extern status_t _kern_rename_thread(thread_id thread, const char *newName);
extern status_t _kern_set_thread_priority(thread_id thread, int32 newPriority);
extern status_t _kern_kill_thread(thread_id thread);
extern void _kern_exit_thread(status_t returnValue);
extern void _kern_thread_yield(void);
extern status_t _kern_wait_for_thread(thread_id thread, status_t *_returnCode);
extern bool _kern_has_data(thread_id thread);
extern status_t _kern_send_data(thread_id thread, int32 code, const void *buffer, size_t bufferSize);