Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
smp.h File Reference
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/cpumask.h>
#include <linux/init.h>

Go to the source code of this file.

Data Structures

struct  call_single_data
 

Macros

#define raw_smp_processor_id()   0
 
#define smp_call_function(func, info, wait)   (up_smp_call_function(func, info))
 
#define on_each_cpu(func, info, wait)
 
#define on_each_cpu_mask(mask, func, info, wait)
 
#define on_each_cpu_cond(cond_func, func, info, wait, gfp_flags)
 
#define smp_prepare_boot_cpu()   do {} while (0)
 
#define smp_call_function_many(mask, func, info, wait)   (up_smp_call_function(func, info))
 
#define smp_processor_id()   raw_smp_processor_id()
 
#define get_cpu()   ({ preempt_disable(); smp_processor_id(); })
 
#define put_cpu()   preempt_enable()
 

Typedefs

typedef void(* smp_call_func_t )(void *info)
 

Functions

void cpu_idle (void)
 
int smp_call_function_single (int cpuid, smp_call_func_t func, void *info, int wait)
 
void arch_disable_smp_support (void)
 
void smp_setup_processor_id (void)
 

Variables

unsigned int total_cpus
 

Macro Definition Documentation

#define get_cpu ( )    ({ preempt_disable(); smp_processor_id(); })

Definition at line 218 of file smp.h.

#define on_each_cpu (   func,
  info,
  wait 
)
Value:
({ \
local_irq_disable(); \
func(info); \
local_irq_enable(); \
0; \
})

Definition at line 142 of file smp.h.

#define on_each_cpu_cond (   cond_func,
  func,
  info,
  wait,
  gfp_flags 
)
Value:
do { \
void *__info = (info); \
preempt_disable(); \
if ((cond_func)(0, __info)) { \
local_irq_disable(); \
(func)(__info); \
local_irq_enable(); \
} \
preempt_enable(); \
} while (0)

Definition at line 167 of file smp.h.

#define on_each_cpu_mask (   mask,
  func,
  info,
  wait 
)
Value:
do { \
if (cpumask_test_cpu(0, (mask))) { \
local_irq_disable(); \
(func)(info); \
local_irq_enable(); \
} \
} while (0)

Definition at line 155 of file smp.h.

#define put_cpu ( )    preempt_enable()

Definition at line 219 of file smp.h.

#define raw_smp_processor_id ( )    0

Definition at line 135 of file smp.h.

#define smp_call_function (   func,
  info,
  wait 
)    (up_smp_call_function(func, info))

Definition at line 140 of file smp.h.

#define smp_call_function_many (   mask,
  func,
  info,
  wait 
)    (up_smp_call_function(func, info))

Definition at line 181 of file smp.h.

#define smp_prepare_boot_cpu (   void)    do {} while (0)

Definition at line 180 of file smp.h.

#define smp_processor_id ( )    raw_smp_processor_id()

Definition at line 215 of file smp.h.

Typedef Documentation

typedef void(* smp_call_func_t)(void *info)

Definition at line 17 of file smp.h.

Function Documentation

void arch_disable_smp_support ( void  )

arch_disable_smp_support() - disables SMP support for x86 at runtime

Definition at line 851 of file smpboot.c.

void cpu_idle ( void  )

Definition at line 50 of file process.c.

int smp_call_function_single ( int  cpuid,
smp_call_func_t  func,
void info,
int  wait 
)

Definition at line 10 of file up.c.

void smp_setup_processor_id ( void  )

Definition at line 426 of file setup.c.

Variable Documentation

unsigned int total_cpus

Definition at line 180 of file cpu.c.