lkml.org 
[lkml]   [1998]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: smp_processor_id()?
   From: Paul Rusty Russell <Paul.Russell@rustcorp.com.au>
Date: Sat, 05 Dec 1998 16:28:10 +1130

You mean that smp_processor_id() returns 0 and 4?

I assumed smp_processor_id() < smp_num_cpus: SMP hackers, is this
false?

smp_processor_id() is the hardware cpu number, it can be anything.
Such numbers are not guarenteed to be contiguous/ordered/etc.

If so, I have to find a new upper bound for smp_processor_id() for
SMP, or rewrite much of ip_fw.c...

Why? Just do what the scheduler does, by using asking
cpu_number_map[smp_processor_id()], that returns the kind of number
you believed smp_processor_id() to be. (grep for "idle_task" in
kernel/sched.c)

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.067 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site