Home | History | Annotate | Line # | Download | only in common
      1  1.1      matt /*-
      2  1.1      matt  * Copyright (c) 2012 The NetBSD Foundation, Inc.
      3  1.1      matt  * All rights reserved.
      4  1.1      matt  *
      5  1.1      matt  * This code is derived from software contributed to The NetBSD Foundation
      6  1.1      matt  * by Matt Thomas of 3am Software Foundry.
      7  1.1      matt  *
      8  1.1      matt  * Redistribution and use in source and binary forms, with or without
      9  1.1      matt  * modification, are permitted provided that the following conditions
     10  1.1      matt  * are met:
     11  1.1      matt  * 1. Redistributions of source code must retain the above copyright
     12  1.1      matt  *    notice, this list of conditions and the following disclaimer.
     13  1.1      matt  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1      matt  *    notice, this list of conditions and the following disclaimer in the
     15  1.1      matt  *    documentation and/or other materials provided with the distribution.
     16  1.1      matt  *
     17  1.1      matt  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     18  1.1      matt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     19  1.1      matt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     20  1.1      matt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     21  1.1      matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     22  1.1      matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     23  1.1      matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     24  1.1      matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     25  1.1      matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     26  1.1      matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     27  1.1      matt  * POSSIBILITY OF SUCH DAMAGE.
     28  1.1      matt  */
     29  1.1      matt 
     30  1.1      matt #include <sys/cdefs.h>
     31  1.1      matt 
     32  1.2  pgoyette __KERNEL_RCSID(1, "$NetBSD: kern_sa_60.c,v 1.2 2019/01/27 02:08:39 pgoyette Exp $");
     33  1.2  pgoyette 
     34  1.2  pgoyette #if defined(_KERNEL_OPT)
     35  1.2  pgoyette #include "opt_compat_netbsd.h"
     36  1.2  pgoyette #endif
     37  1.1      matt 
     38  1.1      matt #include <sys/systm.h>
     39  1.1      matt #include <sys/syscall.h>
     40  1.2  pgoyette #include <sys/syscallvar.h>
     41  1.1      matt #include <sys/syscallargs.h>
     42  1.1      matt 
     43  1.2  pgoyette #include <compat/common/compat_mod.h>
     44  1.2  pgoyette 
     45  1.2  pgoyette static const struct syscall_package kern_sa_60_syscalls[] = {
     46  1.2  pgoyette 	{ SYS_compat_60_sa_register, 0,
     47  1.2  pgoyette 	     (sy_call_t *)compat_60_sys_sa_register },
     48  1.2  pgoyette 	{ SYS_compat_60_sa_stacks, 0, (sy_call_t *)compat_60_sys_sa_stacks },
     49  1.2  pgoyette 	{ SYS_compat_60_sa_enable, 0, (sy_call_t *)compat_60_sys_sa_enable },
     50  1.2  pgoyette 	{ SYS_compat_60_sa_setconcurrency, 0,
     51  1.2  pgoyette 	     (sy_call_t *)compat_60_sys_sa_setconcurrency },
     52  1.2  pgoyette 	{ SYS_compat_60_sa_yield, 0, (sy_call_t *)compat_60_sys_sa_yield },
     53  1.2  pgoyette 	{ SYS_compat_60_sa_preempt, 0, (sy_call_t *)compat_60_sys_sa_preempt },
     54  1.2  pgoyette 	{ 0, 0, NULL }
     55  1.2  pgoyette };
     56  1.2  pgoyette 
     57  1.1      matt int
     58  1.1      matt compat_60_sys_sa_register(lwp_t *l,
     59  1.1      matt 	const struct compat_60_sys_sa_register_args *uap,
     60  1.1      matt 	register_t *retval)
     61  1.1      matt {
     62  1.1      matt 	return sys_nosys(l, uap, retval);
     63  1.1      matt }
     64  1.1      matt 
     65  1.1      matt int
     66  1.1      matt compat_60_sys_sa_stacks(lwp_t *l,
     67  1.1      matt 	const struct compat_60_sys_sa_stacks_args *uap,
     68  1.1      matt 	register_t *retval)
     69  1.1      matt {
     70  1.1      matt 	return sys_nosys(l, uap, retval);
     71  1.1      matt }
     72  1.1      matt 
     73  1.1      matt int
     74  1.1      matt compat_60_sys_sa_enable(lwp_t *l,
     75  1.1      matt 	const void *uap,
     76  1.1      matt 	register_t *retval)
     77  1.1      matt {
     78  1.1      matt 	return sys_nosys(l, uap, retval);
     79  1.1      matt }
     80  1.1      matt 
     81  1.1      matt int
     82  1.1      matt compat_60_sys_sa_setconcurrency(lwp_t *l,
     83  1.1      matt 	const struct compat_60_sys_sa_setconcurrency_args *uap,
     84  1.1      matt 	register_t *retval)
     85  1.1      matt {
     86  1.1      matt 	return sys_nosys(l, uap, retval);
     87  1.1      matt }
     88  1.1      matt 
     89  1.1      matt int
     90  1.1      matt compat_60_sys_sa_yield(lwp_t *l,
     91  1.1      matt 	const void *uap,
     92  1.1      matt 	register_t *retval)
     93  1.1      matt {
     94  1.1      matt 	return sys_nosys(l, uap, retval);
     95  1.1      matt }
     96  1.1      matt 
     97  1.1      matt int
     98  1.1      matt compat_60_sys_sa_preempt(lwp_t *l,
     99  1.1      matt 	const struct compat_60_sys_sa_preempt_args *uap,
    100  1.1      matt 	register_t *retval)
    101  1.1      matt {
    102  1.1      matt 	return sys_nosys(l, uap, retval);
    103  1.1      matt }
    104  1.2  pgoyette 
    105  1.2  pgoyette int
    106  1.2  pgoyette kern_sa_60_init(void)
    107  1.2  pgoyette {
    108  1.2  pgoyette 
    109  1.2  pgoyette 	return syscall_establish(NULL, kern_sa_60_syscalls);
    110  1.2  pgoyette }
    111  1.2  pgoyette 
    112  1.2  pgoyette int
    113  1.2  pgoyette kern_sa_60_fini(void)
    114  1.2  pgoyette {
    115  1.2  pgoyette 
    116  1.2  pgoyette 	return syscall_disestablish(NULL, kern_sa_60_syscalls);
    117  1.2  pgoyette }
    118