Changeset 23 for trunk/kernel/syscalls/sys_thread_yield.c
- Timestamp:
- Jun 18, 2017, 10:06:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_yield.c
r1 r23 1 1 /* 2 * kern/sys_thread_yield.c - calls the scheduler to yield current CPU2 * sys_thread_yield.c - calls the scheduler to yield 3 3 * 4 * Copyright (c) 2008,2009,2010,2011,2012 Ghassan Almaless 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016,2017) 6 * 5 7 * Copyright (c) 2011,2012 UPMC Sorbonne Universites 6 8 * 7 * This file is part of ALMOS- kernel.9 * This file is part of ALMOS-MKH. 8 10 * 9 * ALMOS- kernelis free software; you can redistribute it and/or modify it11 * ALMOS-MKH is free software; you can redistribute it and/or modify it 10 12 * under the terms of the GNU General Public License as published by 11 13 * the Free Software Foundation; version 2.0 of the License. 12 14 * 13 * ALMOS- kernelis distributed in the hope that it will be useful, but15 * ALMOS-MKH is distributed in the hope that it will be useful, but 14 16 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 17 19 * 18 20 * You should have received a copy of the GNU General Public License 19 * along with ALMOS- kernel; if not, write to the Free Software Foundation,21 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 20 22 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 23 */ 22 24 23 #include <thread.h>24 25 #include <scheduler.h> 25 26 26 27 int sys_thread_yield() 27 28 { 28 return sched_yield(current_thread); 29 sched_yield(); 30 return 0; 29 31 }
Note: See TracChangeset
for help on using the changeset viewer.