1*a987d85cSthorpej /*	$NetBSD: linux32_sched.h,v 1.3 2021/09/19 23:01:50 thorpej Exp $	*/
2202e985bSchristos 
3202e985bSchristos /*-
4202e985bSchristos  * Copyright (c) 1999 The NetBSD Foundation, Inc.
5202e985bSchristos  * All rights reserved.
6202e985bSchristos  *
7202e985bSchristos  * This code is derived from software contributed to The NetBSD Foundation
8202e985bSchristos  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9202e985bSchristos  * NASA Ames Research Center.
10202e985bSchristos  *
11202e985bSchristos  * Redistribution and use in source and binary forms, with or without
12202e985bSchristos  * modification, are permitted provided that the following conditions
13202e985bSchristos  * are met:
14202e985bSchristos  * 1. Redistributions of source code must retain the above copyright
15202e985bSchristos  *    notice, this list of conditions and the following disclaimer.
16202e985bSchristos  * 2. Redistributions in binary form must reproduce the above copyright
17202e985bSchristos  *    notice, this list of conditions and the following disclaimer in the
18202e985bSchristos  *    documentation and/or other materials provided with the distribution.
19202e985bSchristos  *
20202e985bSchristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21202e985bSchristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22202e985bSchristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23202e985bSchristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24202e985bSchristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25202e985bSchristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26202e985bSchristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27202e985bSchristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28202e985bSchristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29202e985bSchristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30202e985bSchristos  * POSSIBILITY OF SUCH DAMAGE.
31202e985bSchristos  */
32202e985bSchristos 
33202e985bSchristos #ifndef _LINUX32_SCHED_H
34202e985bSchristos #define	_LINUX32_SCHED_H
35202e985bSchristos 
36202e985bSchristos struct linux32_sched_param {
37202e985bSchristos 	int	sched_priority;
38202e985bSchristos };
39202e985bSchristos 
40202e985bSchristos struct linux32_timespec {
41202e985bSchristos 	linux32_time_t	tv_sec;		/* seconds */
42202e985bSchristos 	int		tv_nsec;	/* nanoseconds */
43202e985bSchristos };
44202e985bSchristos 
45*a987d85cSthorpej struct linux32_itimerspec {
46*a987d85cSthorpej 	struct linux32_timespec it_interval;
47*a987d85cSthorpej 	struct linux32_timespec it_value;
48*a987d85cSthorpej };
49*a987d85cSthorpej 
50*a987d85cSthorpej void	native_to_linux32_timespec(struct linux32_timespec *,
51*a987d85cSthorpej 	    const struct timespec *);
52*a987d85cSthorpej void	linux32_to_native_timespec(struct timespec *,
53*a987d85cSthorpej 	    const struct linux32_timespec *);
54*a987d85cSthorpej 
55*a987d85cSthorpej void	native_to_linux32_itimerspec(struct linux32_itimerspec *,
56*a987d85cSthorpej 	    const struct itimerspec *);
57*a987d85cSthorpej void	linux32_to_native_itimerspec(struct itimerspec *,
58*a987d85cSthorpej 	    const struct linux32_itimerspec *);
59202e985bSchristos 
60202e985bSchristos #endif /* _LINUX32_SCHED_H */
61