xref: /dflybsd-src/lib/libc/sys/sched_getcpu.2 (revision 12041c96816e1e7cccac302fd5656529fe9c9e9b)
1*a7477187SSepherosa Ziehau.\" Copyright (c) 2017 The DragonFly Project.  All rights reserved.
2*a7477187SSepherosa Ziehau.\"
3*a7477187SSepherosa Ziehau.\" This code is derived from software contributed to The DragonFly Project
4*a7477187SSepherosa Ziehau.\" by Sepherosa Ziehau <sepherosa@gmail.com>.
5*a7477187SSepherosa Ziehau.\"
6*a7477187SSepherosa Ziehau.\" Redistribution and use in source and binary forms, with or without
7*a7477187SSepherosa Ziehau.\" modification, are permitted provided that the following conditions
8*a7477187SSepherosa Ziehau.\" are met:
9*a7477187SSepherosa Ziehau.\"
10*a7477187SSepherosa Ziehau.\" 1. Redistributions of source code must retain the above copyright
11*a7477187SSepherosa Ziehau.\"    notice, this list of conditions and the following disclaimer.
12*a7477187SSepherosa Ziehau.\" 2. Redistributions in binary form must reproduce the above copyright
13*a7477187SSepherosa Ziehau.\"    notice, this list of conditions and the following disclaimer in
14*a7477187SSepherosa Ziehau.\"    the documentation and/or other materials provided with the
15*a7477187SSepherosa Ziehau.\"    distribution.
16*a7477187SSepherosa Ziehau.\" 3. Neither the name of The DragonFly Project nor the names of its
17*a7477187SSepherosa Ziehau.\"    contributors may be used to endorse or promote products derived
18*a7477187SSepherosa Ziehau.\"    from this software without specific, prior written permission.
19*a7477187SSepherosa Ziehau.\"
20*a7477187SSepherosa Ziehau.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*a7477187SSepherosa Ziehau.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*a7477187SSepherosa Ziehau.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*a7477187SSepherosa Ziehau.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
24*a7477187SSepherosa Ziehau.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25*a7477187SSepherosa Ziehau.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
26*a7477187SSepherosa Ziehau.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27*a7477187SSepherosa Ziehau.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28*a7477187SSepherosa Ziehau.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29*a7477187SSepherosa Ziehau.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30*a7477187SSepherosa Ziehau.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*a7477187SSepherosa Ziehau.\" SUCH DAMAGE.
32*a7477187SSepherosa Ziehau.\"
33*a7477187SSepherosa Ziehau.Dd January 19, 2017
34*a7477187SSepherosa Ziehau.Dt SCHED_GETCPU 2
35*a7477187SSepherosa Ziehau.Os
36*a7477187SSepherosa Ziehau.Sh NAME
37*a7477187SSepherosa Ziehau.Nm sched_getcpu
38*a7477187SSepherosa Ziehau.Nd get the CPU on which the calling thread is running
39*a7477187SSepherosa Ziehau.Sh LIBRARY
40*a7477187SSepherosa Ziehau.Lb libc
41*a7477187SSepherosa Ziehau.Sh SYNOPSIS
42*a7477187SSepherosa Ziehau.In sys/types.h
43*a7477187SSepherosa Ziehau.In sys/sched.h
44*a7477187SSepherosa Ziehau.Ft int
45*a7477187SSepherosa Ziehau.Fn sched_getcpu "void"
46*a7477187SSepherosa Ziehau.Sh DESCRIPTION
47*a7477187SSepherosa ZiehauThe
48*a7477187SSepherosa Ziehau.Fn sched_getcpu
49*a7477187SSepherosa Ziehaureturns the CPU on which the calling thread is running.
50*a7477187SSepherosa Ziehau.Sh SEE ALSO
51*a7477187SSepherosa Ziehau.Xr usched_set 2
52*a7477187SSepherosa Ziehau.Sh HISTORY
53*a7477187SSepherosa ZiehauThe
54*a7477187SSepherosa Ziehau.Fn sched_getcpu
55*a7477187SSepherosa Ziehaufunction first appeared in
56*a7477187SSepherosa Ziehau.Dx 4.7 .
57