Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23597
b: refs/heads/master
c: 3d18bd7
h: refs/heads/master
i:
  23595: 13be319
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 25, 2006
1 parent 48543f4 commit 9ec1a10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ccb46000f4bb459777686611157ac0eac928704e
refs/heads/master: 3d18bd74a22d0bed3bc81fc64c4ba6344a10f155
11 changes: 4 additions & 7 deletions trunk/include/linux/cpumask.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,13 @@ static inline void __cpus_shift_left(cpumask_t *dstp,
#ifdef CONFIG_SMP
int __first_cpu(const cpumask_t *srcp);
#define first_cpu(src) __first_cpu(&(src))
int __next_cpu(int n, const cpumask_t *srcp);
#define next_cpu(n, src) __next_cpu((n), &(src))
#else
#define first_cpu(src) 0
#define first_cpu(src) 0
#define next_cpu(n, src) 1
#endif

#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
{
return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1));
}

#define cpumask_of_cpu(cpu) \
({ \
typeof(_unused_cpumask_arg_) m; \
Expand Down
5 changes: 5 additions & 0 deletions trunk/lib/cpumask.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ int __first_cpu(const cpumask_t *srcp)
}
EXPORT_SYMBOL(__first_cpu);

int __next_cpu(int n, const cpumask_t *srcp)
{
return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
}
EXPORT_SYMBOL(__next_cpu);

0 comments on commit 9ec1a10

Please sign in to comment.