summaryrefslogtreecommitdiffstats
path: root/include/sched.h
blob: 57be1678fdaa207e3354f48e22945c3b70be184a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* SPDX License Identifier: GPL-2.0 */
#ifndef __BAREBOX_SCHED_H_
#define __BAREBOX_SCHED_H_

#include <bthread.h>
#include <poller.h>

static inline void resched(void)
{
	poller_call();
	if (!IS_ENABLED(CONFIG_POLLER) || !poller_active)
		bthread_reschedule();
}

#endif