Ignore:
Timestamp:
Jun 18, 2017, 10:06:41 PM (7 years ago)
Author:
alain
Message:

Introduce syscalls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_thread_yield.c

    r1 r23  
    11/*
    2  * kern/sys_thread_yield.c - calls the scheduler to yield current CPU
     2 * sys_thread_yield.c - calls the scheduler to yield
    33 *
    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 *
    57 * Copyright (c) 2011,2012 UPMC Sorbonne Universites
    68 *
    7  * This file is part of ALMOS-kernel.
     9 * This file is part of ALMOS-MKH.
    810 *
    9  * ALMOS-kernel is free software; you can redistribute it and/or modify it
     11 * ALMOS-MKH is free software; you can redistribute it and/or modify it
    1012 * under the terms of the GNU General Public License as published by
    1113 * the Free Software Foundation; version 2.0 of the License.
    1214 *
    13  * ALMOS-kernel is distributed in the hope that it will be useful, but
     15 * ALMOS-MKH is distributed in the hope that it will be useful, but
    1416 * WITHOUT ANY WARRANTY; without even the implied warranty of
    1517 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     
    1719 *
    1820 * 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,
    2022 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    2123 */
    2224
    23 #include <thread.h>
    2425#include <scheduler.h>
    2526
    2627int sys_thread_yield()
    2728{
    28         return sched_yield(current_thread);
     29        sched_yield();
     30        return 0;
    2931}
Note: See TracChangeset for help on using the changeset viewer.