lkml.org 
[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [Patch 6/23] mask v2 - Replace cpumask_t with one using mask
From
Date
On Thu, 2004-04-01 at 13:11, Paul Jackson wrote:
> Patch_6_of_23 - Rework cpumasks to use new mask ADT
> Removes many old include/asm-<arch> and asm-generic cpumask files
> Add intersects, subset, xor and andnot operators.
> Provides temporary emulators for obsolete const, promote, coerce
> Presents entire cpumask API clearly in single cpumask.h file

<snip>

> +#else /* !CONFIG_SMP */
> +
> +#define cpu_online_map cpumask_of_cpu(0)
> +#define cpu_possible_map cpumask_of_cpu(0)

I mentioned earlier that there's probably a better way to do this for
UP... What do you think about this?

-Matt
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.4-pj_mask_v2/include/linux/cpumask.h linux-2.6.4-UP_online_map/include/linux/cpumask.h
--- linux-2.6.4-pj_mask_v2/include/linux/cpumask.h Fri Apr 2 14:03:21 2004
+++ linux-2.6.4-UP_online_map/include/linux/cpumask.h Fri Apr 2 14:13:54 2004
@@ -134,8 +134,12 @@ extern cpumask_t cpu_possible_map;

#else /* !CONFIG_SMP */

-#define cpu_online_map cpumask_of_cpu(0)
-#define cpu_possible_map cpumask_of_cpu(0)
+#define cpu_online_map \
+({ \
+ cpumask_t m = MASK_ALL1(NR_CPUS); \
+ m; \
+})
+#define cpu_possible_map cpu_online_map

#define num_online_cpus() 1
#define num_possible_cpus() 1
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.126 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site