Print this page
XXXX pass in cpu_pause_func via pause_cpus


 642 void    cpu_delete_intrstat(cpu_t *);
 643 int     cpu_kstat_intrstat_update(kstat_t *, int);
 644 void    cpu_intr_swtch_enter(kthread_t *);
 645 void    cpu_intr_swtch_exit(kthread_t *);
 646 
 647 void    mbox_lock_init(void);    /* initialize cross-call locks */
 648 void    mbox_init(int cpun);     /* initialize cross-calls */
 649 void    poke_cpu(int cpun);      /* interrupt another CPU (to preempt) */
 650 
 651 /*
 652  * values for safe_list.  Pause state that CPUs are in.
 653  */
 654 #define PAUSE_IDLE      0               /* normal state */
 655 #define PAUSE_READY     1               /* paused thread ready to spl */
 656 #define PAUSE_WAIT      2               /* paused thread is spl-ed high */
 657 #define PAUSE_DIE       3               /* tell pause thread to leave */
 658 #define PAUSE_DEAD      4               /* pause thread has left */
 659 
 660 void    mach_cpu_pause(volatile char *);
 661 
 662 void    pause_cpus(cpu_t *off_cp);
 663 void    start_cpus(void);
 664 int     cpus_paused(void);
 665 
 666 void    cpu_pause_init(void);
 667 cpu_t   *cpu_get(processorid_t cpun);   /* get the CPU struct associated */
 668 
 669 int     cpu_online(cpu_t *cp);                  /* take cpu online */
 670 int     cpu_offline(cpu_t *cp, int flags);      /* take cpu offline */
 671 int     cpu_spare(cpu_t *cp, int flags);        /* take cpu to spare */
 672 int     cpu_faulted(cpu_t *cp, int flags);      /* take cpu to faulted */
 673 int     cpu_poweron(cpu_t *cp);         /* take powered-off cpu to offline */
 674 int     cpu_poweroff(cpu_t *cp);        /* take offline cpu to powered-off */
 675 
 676 cpu_t   *cpu_intr_next(cpu_t *cp);      /* get next online CPU taking intrs */
 677 int     cpu_intr_count(cpu_t *cp);      /* count # of CPUs handling intrs */
 678 int     cpu_intr_on(cpu_t *cp);         /* CPU taking I/O interrupts? */
 679 void    cpu_intr_enable(cpu_t *cp);     /* enable I/O interrupts */
 680 int     cpu_intr_disable(cpu_t *cp);    /* disable I/O interrupts */
 681 void    cpu_intr_alloc(cpu_t *cp, int n); /* allocate interrupt threads */
 682 




 642 void    cpu_delete_intrstat(cpu_t *);
 643 int     cpu_kstat_intrstat_update(kstat_t *, int);
 644 void    cpu_intr_swtch_enter(kthread_t *);
 645 void    cpu_intr_swtch_exit(kthread_t *);
 646 
 647 void    mbox_lock_init(void);    /* initialize cross-call locks */
 648 void    mbox_init(int cpun);     /* initialize cross-calls */
 649 void    poke_cpu(int cpun);      /* interrupt another CPU (to preempt) */
 650 
 651 /*
 652  * values for safe_list.  Pause state that CPUs are in.
 653  */
 654 #define PAUSE_IDLE      0               /* normal state */
 655 #define PAUSE_READY     1               /* paused thread ready to spl */
 656 #define PAUSE_WAIT      2               /* paused thread is spl-ed high */
 657 #define PAUSE_DIE       3               /* tell pause thread to leave */
 658 #define PAUSE_DEAD      4               /* pause thread has left */
 659 
 660 void    mach_cpu_pause(volatile char *);
 661 
 662 void    pause_cpus(cpu_t *off_cp, void *(*func)(void *));
 663 void    start_cpus(void);
 664 int     cpus_paused(void);
 665 
 666 void    cpu_pause_init(void);
 667 cpu_t   *cpu_get(processorid_t cpun);   /* get the CPU struct associated */
 668 
 669 int     cpu_online(cpu_t *cp);                  /* take cpu online */
 670 int     cpu_offline(cpu_t *cp, int flags);      /* take cpu offline */
 671 int     cpu_spare(cpu_t *cp, int flags);        /* take cpu to spare */
 672 int     cpu_faulted(cpu_t *cp, int flags);      /* take cpu to faulted */
 673 int     cpu_poweron(cpu_t *cp);         /* take powered-off cpu to offline */
 674 int     cpu_poweroff(cpu_t *cp);        /* take offline cpu to powered-off */
 675 
 676 cpu_t   *cpu_intr_next(cpu_t *cp);      /* get next online CPU taking intrs */
 677 int     cpu_intr_count(cpu_t *cp);      /* count # of CPUs handling intrs */
 678 int     cpu_intr_on(cpu_t *cp);         /* CPU taking I/O interrupts? */
 679 void    cpu_intr_enable(cpu_t *cp);     /* enable I/O interrupts */
 680 int     cpu_intr_disable(cpu_t *cp);    /* disable I/O interrupts */
 681 void    cpu_intr_alloc(cpu_t *cp, int n); /* allocate interrupt threads */
 682