1*84dd0c08SBrooks Davis /*-
2*84dd0c08SBrooks Davis * Copyright (c) 2021 The FreeBSD Foundation
3*84dd0c08SBrooks Davis *
4*84dd0c08SBrooks Davis * This software were developed by Konstantin Belousov <kib@FreeBSD.org>
5*84dd0c08SBrooks Davis * under sponsorship from the FreeBSD Foundation.
6*84dd0c08SBrooks Davis *
7*84dd0c08SBrooks Davis * Redistribution and use in source and binary forms, with or without
8*84dd0c08SBrooks Davis * modification, are permitted provided that the following conditions
9*84dd0c08SBrooks Davis * are met:
10*84dd0c08SBrooks Davis * 1. Redistributions of source code must retain the above copyright
11*84dd0c08SBrooks Davis * notice, this list of conditions and the following disclaimer.
12*84dd0c08SBrooks Davis * 2. Redistributions in binary form must reproduce the above copyright
13*84dd0c08SBrooks Davis * notice, this list of conditions and the following disclaimer in the
14*84dd0c08SBrooks Davis * documentation and/or other materials provided with the distribution.
15*84dd0c08SBrooks Davis *
16*84dd0c08SBrooks Davis * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17*84dd0c08SBrooks Davis * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*84dd0c08SBrooks Davis * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*84dd0c08SBrooks Davis * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20*84dd0c08SBrooks Davis * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*84dd0c08SBrooks Davis * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22*84dd0c08SBrooks Davis * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*84dd0c08SBrooks Davis * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24*84dd0c08SBrooks Davis * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*84dd0c08SBrooks Davis * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*84dd0c08SBrooks Davis * SUCH DAMAGE.
27*84dd0c08SBrooks Davis */
28*84dd0c08SBrooks Davis
29*84dd0c08SBrooks Davis #include <sched.h>
30*84dd0c08SBrooks Davis #include "libc_private.h"
31*84dd0c08SBrooks Davis
32*84dd0c08SBrooks Davis int
sched_getcpu(void)33*84dd0c08SBrooks Davis sched_getcpu(void)
34*84dd0c08SBrooks Davis {
35*84dd0c08SBrooks Davis return (__sys_sched_getcpu());
36*84dd0c08SBrooks Davis }
37