1/* 2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include <OS.h> 8#include <syscalls.h> 9 10 11status_t 12looper(void *) 13{ 14 while (true) { 15 _kern_thread_yield(); 16 } 17 18 return B_OK; 19} 20 21 22int 23main() 24{ 25 thread_id thread = spawn_thread(looper, "Real-Time Looper", B_REAL_TIME_PRIORITY, NULL); 26 if (thread < B_OK) 27 return -1; 28 29 resume_thread(thread); 30 wait_for_thread(thread, NULL); 31 32 return 0; 33} 34