aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_types.h
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2008-03-02 07:39:22 +0000
committerJeff Roberson <jeff@FreeBSD.org>2008-03-02 07:39:22 +0000
commitd7f687fc9b6513875325f8aad4c9a92444984b96 (patch)
tree08c6ca461fae4d8b5341e887a545b2d167f50daf /sys/sys/_types.h
parent885d51a38a7d27227219d37738b67fd39064ec6a (diff)
downloadsrc-d7f687fc9b6513875325f8aad4c9a92444984b96.tar.gz
src-d7f687fc9b6513875325f8aad4c9a92444984b96.zip
Add cpuset, an api for thread to cpu binding and cpu resource grouping
and assignment. - Add a reference to a struct cpuset in each thread that is inherited from the thread that created it. - Release the reference when the thread is destroyed. - Add prototypes for syscalls and macros for manipulating cpusets in sys/cpuset.h - Add syscalls to create, get, and set new numbered cpusets: cpuset(), cpuset_{get,set}id() - Add syscalls for getting and setting affinity masks for cpusets or individual threads: cpuid_{get,set}affinity() - Add types for the 'level' and 'which' parameters for the cpuset. This will permit expansion of the api to cover cpu masks for other objects identifiable with an id_t integer. For example, IRQs and Jails may be coming soon. - The root set 0 contains all valid cpus. All thread initially belong to cpuset 1. This permits migrating all threads off of certain cpus to reserve them for special applications. Sponsored by: Nokia Discussed with: arch, rwatson, brooks, davidxu, deischen Reviewed by: antoine
Notes
Notes: svn path=/head/; revision=176730
Diffstat (limited to 'sys/sys/_types.h')
-rw-r--r--sys/sys/_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 6f1f74a3bc07..bee2ccad0896 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -61,6 +61,9 @@ typedef struct __timer *__timer_t; /* timer_gettime()... */
typedef struct __mq *__mqd_t; /* mq_open()... */
typedef __uint32_t __uid_t;
typedef unsigned int __useconds_t; /* microseconds (unsigned) */
+typedef int __cpuwhich_t; /* which parameter for cpuset. */
+typedef int __cpulevel_t; /* level parameter for cpuset. */
+typedef int __cpusetid_t; /* cpuset identifier. */
/*
* Unusual type definitions.