aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index a2c819d3c96e..032560295fcb 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -272,6 +272,8 @@ static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp)
272 * @cpu: cpu number (< nr_cpu_ids) 272 * @cpu: cpu number (< nr_cpu_ids)
273 * @cpumask: the cpumask pointer 273 * @cpumask: the cpumask pointer
274 * 274 *
275 * Returns 1 if @cpu is set in @cpumask, else returns 0
276 *
275 * No static inline type checking - see Subtlety (1) above. 277 * No static inline type checking - see Subtlety (1) above.
276 */ 278 */
277#define cpumask_test_cpu(cpu, cpumask) \ 279#define cpumask_test_cpu(cpu, cpumask) \
@@ -282,6 +284,8 @@ static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp)
282 * @cpu: cpu number (< nr_cpu_ids) 284 * @cpu: cpu number (< nr_cpu_ids)
283 * @cpumask: the cpumask pointer 285 * @cpumask: the cpumask pointer
284 * 286 *
287 * Returns 1 if @cpu is set in old bitmap of @cpumask, else returns 0
288 *
285 * test_and_set_bit wrapper for cpumasks. 289 * test_and_set_bit wrapper for cpumasks.
286 */ 290 */
287static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) 291static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask)
@@ -294,6 +298,8 @@ static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask)
294 * @cpu: cpu number (< nr_cpu_ids) 298 * @cpu: cpu number (< nr_cpu_ids)
295 * @cpumask: the cpumask pointer 299 * @cpumask: the cpumask pointer
296 * 300 *
301 * Returns 1 if @cpu is set in old bitmap of @cpumask, else returns 0
302 *
297 * test_and_clear_bit wrapper for cpumasks. 303 * test_and_clear_bit wrapper for cpumasks.
298 */ 304 */
299static inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) 305static inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask)
@@ -324,6 +330,8 @@ static inline void cpumask_clear(struct cpumask *dstp)
324 * @dstp: the cpumask result 330 * @dstp: the cpumask result
325 * @src1p: the first input 331 * @src1p: the first input
326 * @src2p: the second input 332 * @src2p: the second input
333 *
334 * If *@dstp is empty, returns 0, else returns 1
327 */ 335 */
328static inline int cpumask_and(struct cpumask *dstp, 336static inline int cpumask_and(struct cpumask *dstp,
329 const struct cpumask *src1p, 337 const struct cpumask *src1p,
@@ -365,6 +373,8 @@ static inline void cpumask_xor(struct cpumask *dstp,
365 * @dstp: the cpumask result 373 * @dstp: the cpumask result
366 * @src1p: the first input 374 * @src1p: the first input
367 * @src2p: the second input 375 * @src2p: the second input
376 *
377 * If *@dstp is empty, returns 0, else returns 1
368 */ 378 */
369static inline int cpumask_andnot(struct cpumask *dstp, 379static inline int cpumask_andnot(struct cpumask *dstp,
370 const struct cpumask *src1p, 380 const struct cpumask *src1p,
@@ -414,6 +424,8 @@ static inline bool cpumask_intersects(const struct cpumask *src1p,
414 * cpumask_subset - (*src1p & ~*src2p) == 0 424 * cpumask_subset - (*src1p & ~*src2p) == 0
415 * @src1p: the first input 425 * @src1p: the first input
416 * @src2p: the second input 426 * @src2p: the second input
427 *
428 * Returns 1 if *@src1p is a subset of *@src2p, else returns 0
417 */ 429 */
418static inline int cpumask_subset(const struct cpumask *src1p, 430static inline int cpumask_subset(const struct cpumask *src1p,
419 const struct cpumask *src2p) 431 const struct cpumask *src2p)
@@ -579,9 +591,8 @@ static inline int cpulist_scnprintf(char *buf, int len,
579} 591}
580 592
581/** 593/**
582 * cpulist_parse_user - extract a cpumask from a user string of ranges 594 * cpulist_parse - extract a cpumask from a user string of ranges
583 * @buf: the buffer to extract from 595 * @buf: the buffer to extract from
584 * @len: the length of the buffer
585 * @dstp: the cpumask to set. 596 * @dstp: the cpumask to set.
586 * 597 *
587 * Returns -errno, or 0 for success. 598 * Returns -errno, or 0 for success.