lx_emul: import shadow sched.c from allwinner repo

Ref genodelabs/genode#4411
This commit is contained in:
Josef Söntgen 2022-01-14 17:15:02 +01:00 committed by Norman Feske
parent 96ca806e0d
commit 0f70212139

View File

@ -0,0 +1,23 @@
/*
* \brief Supplement for emulation of kernel/sched/core.c
* \author Norman Feske
* \date 2021-06-02
*/
/*
* Copyright (C) 2021 Genode Labs GmbH
*
* This file is distributed under the terms of the GNU General Public License
* version 2.
*/
#include <linux/sched.h>
int __cond_resched(void)
{
if (should_resched(0)) {
schedule();
return 1;
}
return 0;
}