Deleted Added
full compact
cpuset.h (185435) cpuset.h (192895)
1/*-
2 * Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
3 * All rights reserved.
4 *
5 * Copyright (c) 2008 Nokia Corporation
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
3 * All rights reserved.
4 *
5 * Copyright (c) 2008 Nokia Corporation
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/sys/cpuset.h 185435 2008-11-29 14:32:14Z bz $
29 * $FreeBSD: head/sys/sys/cpuset.h 192895 2009-05-27 14:11:23Z jamie $
30 */
31
32#ifndef _SYS_CPUSET_H_
33#define _SYS_CPUSET_H_
34
35#ifdef _KERNEL
36#define CPU_SETSIZE MAXCPU
37#endif

--- 126 unchanged lines hidden (view full) ---

164 LIST_ENTRY(cpuset) cs_siblings; /* (c) Sibling set link. */
165 struct setlist cs_children; /* (c) List of children. */
166};
167
168#define CPU_SET_ROOT 0x0001 /* Set is a root set. */
169#define CPU_SET_RDONLY 0x0002 /* No modification allowed. */
170
171extern cpuset_t *cpuset_root;
30 */
31
32#ifndef _SYS_CPUSET_H_
33#define _SYS_CPUSET_H_
34
35#ifdef _KERNEL
36#define CPU_SETSIZE MAXCPU
37#endif

--- 126 unchanged lines hidden (view full) ---

164 LIST_ENTRY(cpuset) cs_siblings; /* (c) Sibling set link. */
165 struct setlist cs_children; /* (c) List of children. */
166};
167
168#define CPU_SET_ROOT 0x0001 /* Set is a root set. */
169#define CPU_SET_RDONLY 0x0002 /* No modification allowed. */
170
171extern cpuset_t *cpuset_root;
172struct prison;
172struct proc;
173struct proc;
173struct thread;
174
175struct cpuset *cpuset_thread0(void);
176struct cpuset *cpuset_ref(struct cpuset *);
177void cpuset_rel(struct cpuset *);
178int cpuset_setthread(lwpid_t id, cpuset_t *);
174
175struct cpuset *cpuset_thread0(void);
176struct cpuset *cpuset_ref(struct cpuset *);
177void cpuset_rel(struct cpuset *);
178int cpuset_setthread(lwpid_t id, cpuset_t *);
179int cpuset_create_root(struct thread *, struct cpuset **);
179int cpuset_create_root(struct prison *, struct cpuset **);
180int cpuset_setproc_update_set(struct proc *, struct cpuset *);
181
182#else
183__BEGIN_DECLS
184int cpuset(cpusetid_t *);
185int cpuset_setid(cpuwhich_t, id_t, cpusetid_t);
186int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *);
187int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *);
188int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *);
189__END_DECLS
190#endif
191#endif /* !_SYS_CPUSET_H_ */
180int cpuset_setproc_update_set(struct proc *, struct cpuset *);
181
182#else
183__BEGIN_DECLS
184int cpuset(cpusetid_t *);
185int cpuset_setid(cpuwhich_t, id_t, cpusetid_t);
186int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *);
187int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *);
188int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *);
189__END_DECLS
190#endif
191#endif /* !_SYS_CPUSET_H_ */