hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * SPDX-License-Identifier: GPL-2.0
 */
#ifndef _COBALT_KERNEL_IPIPE_WRAPPERS_H
#define _COBALT_KERNEL_IPIPE_WRAPPERS_H
 
#include <linux/ipipe.h>
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
#define cobalt_set_task_state(tsk, state_value)    \
   set_task_state(tsk, state_value)
#else
/*
 * The co-kernel can still set the current task state safely if it
 * runs on the head stage.
 */
#define cobalt_set_task_state(tsk, state_value)    \
   smp_store_mb((tsk)->state, (state_value))
#endif
 
#ifndef ipipe_root_nr_syscalls
#define ipipe_root_nr_syscalls(ti)    NR_syscalls
#endif
 
#endif /* !_COBALT_KERNEL_IPIPE_WRAPPERS_H */