ia64/xen-unstable

changeset 5246:574fa700e9b7

bitkeeper revision 1.1619.1.1 (429ce20czCzWvLkTZEZqyN2iK_13sw)

sched.h, domain.c:
Make {exec_,}domain_{un,}pause and ..._by_systemcontroller variants
non-inline.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue May 31 22:15:40 2005 +0000 (2005-05-31)
parents fbb531d2ff13
children 70e8e91ea6f6
files xen/common/domain.c xen/include/xen/sched.h
line diff
     1.1 --- a/xen/common/domain.c	Tue May 31 17:13:13 2005 +0000
     1.2 +++ b/xen/common/domain.c	Tue May 31 22:15:40 2005 +0000
     1.3 @@ -223,6 +223,68 @@ void domain_destruct(struct domain *d)
     1.4      send_guest_virq(dom0->exec_domain[0], VIRQ_DOM_EXC);
     1.5  }
     1.6  
     1.7 +void exec_domain_pause(struct exec_domain *ed)
     1.8 +{
     1.9 +    ASSERT(ed != current);
    1.10 +    atomic_inc(&ed->pausecnt);
    1.11 +    domain_sleep(ed);
    1.12 +    sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
    1.13 +}
    1.14 +
    1.15 +void domain_pause(struct domain *d)
    1.16 +{
    1.17 +    struct exec_domain *ed;
    1.18 +
    1.19 +    for_each_exec_domain( d, ed )
    1.20 +    {
    1.21 +        ASSERT(ed != current);
    1.22 +        atomic_inc(&ed->pausecnt);
    1.23 +        domain_sleep(ed);
    1.24 +    }
    1.25 +
    1.26 +    sync_lazy_execstate_cpuset(d->cpuset);
    1.27 +}
    1.28 +
    1.29 +void exec_domain_unpause(struct exec_domain *ed)
    1.30 +{
    1.31 +    ASSERT(ed != current);
    1.32 +    if ( atomic_dec_and_test(&ed->pausecnt) )
    1.33 +        domain_wake(ed);
    1.34 +}
    1.35 +
    1.36 +void domain_unpause(struct domain *d)
    1.37 +{
    1.38 +    struct exec_domain *ed;
    1.39 +
    1.40 +    for_each_exec_domain( d, ed )
    1.41 +        exec_domain_unpause(ed);
    1.42 +}
    1.43 +
    1.44 +void domain_pause_by_systemcontroller(struct domain *d)
    1.45 +{
    1.46 +    struct exec_domain *ed;
    1.47 +
    1.48 +    for_each_exec_domain ( d, ed )
    1.49 +    {
    1.50 +        ASSERT(ed != current);
    1.51 +        if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    1.52 +            domain_sleep(ed);
    1.53 +    }
    1.54 +
    1.55 +    sync_lazy_execstate_cpuset(d->cpuset);
    1.56 +}
    1.57 +
    1.58 +void domain_unpause_by_systemcontroller(struct domain *d)
    1.59 +{
    1.60 +    struct exec_domain *ed;
    1.61 +
    1.62 +    for_each_exec_domain ( d, ed )
    1.63 +    {
    1.64 +        if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    1.65 +            domain_wake(ed);
    1.66 +    }
    1.67 +}
    1.68 +
    1.69  
    1.70  /*
    1.71   * set_info_guest is used for final setup, launching, and state modification 
     2.1 --- a/xen/include/xen/sched.h	Tue May 31 17:13:13 2005 +0000
     2.2 +++ b/xen/include/xen/sched.h	Tue May 31 22:15:40 2005 +0000
     2.3 @@ -389,42 +389,12 @@ static inline int domain_runnable(struct
     2.4               !(ed->domain->domain_flags & (DOMF_shutdown|DOMF_crashed)) );
     2.5  }
     2.6  
     2.7 -static inline void exec_domain_pause(struct exec_domain *ed)
     2.8 -{
     2.9 -    ASSERT(ed != current);
    2.10 -    atomic_inc(&ed->pausecnt);
    2.11 -    domain_sleep(ed);
    2.12 -    sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
    2.13 -}
    2.14 -
    2.15 -static inline void domain_pause(struct domain *d)
    2.16 -{
    2.17 -    struct exec_domain *ed;
    2.18 -
    2.19 -    for_each_exec_domain( d, ed )
    2.20 -    {
    2.21 -        ASSERT(ed != current);
    2.22 -        atomic_inc(&ed->pausecnt);
    2.23 -        domain_sleep(ed);
    2.24 -    }
    2.25 -
    2.26 -    sync_lazy_execstate_cpuset(d->cpuset);
    2.27 -}
    2.28 -
    2.29 -static inline void exec_domain_unpause(struct exec_domain *ed)
    2.30 -{
    2.31 -    ASSERT(ed != current);
    2.32 -    if ( atomic_dec_and_test(&ed->pausecnt) )
    2.33 -        domain_wake(ed);
    2.34 -}
    2.35 -
    2.36 -static inline void domain_unpause(struct domain *d)
    2.37 -{
    2.38 -    struct exec_domain *ed;
    2.39 -
    2.40 -    for_each_exec_domain( d, ed )
    2.41 -        exec_domain_unpause(ed);
    2.42 -}
    2.43 +void exec_domain_pause(struct exec_domain *ed);
    2.44 +void domain_pause(struct domain *d);
    2.45 +void exec_domain_unpause(struct exec_domain *ed);
    2.46 +void domain_unpause(struct domain *d);
    2.47 +void domain_pause_by_systemcontroller(struct domain *d);
    2.48 +void domain_unpause_by_systemcontroller(struct domain *d);
    2.49  
    2.50  static inline void exec_domain_unblock(struct exec_domain *ed)
    2.51  {
    2.52 @@ -432,31 +402,6 @@ static inline void exec_domain_unblock(s
    2.53          domain_wake(ed);
    2.54  }
    2.55  
    2.56 -static inline void domain_pause_by_systemcontroller(struct domain *d)
    2.57 -{
    2.58 -    struct exec_domain *ed;
    2.59 -
    2.60 -    for_each_exec_domain ( d, ed )
    2.61 -    {
    2.62 -        ASSERT(ed != current);
    2.63 -        if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    2.64 -            domain_sleep(ed);
    2.65 -    }
    2.66 -
    2.67 -    sync_lazy_execstate_cpuset(d->cpuset);
    2.68 -}
    2.69 -
    2.70 -static inline void domain_unpause_by_systemcontroller(struct domain *d)
    2.71 -{
    2.72 -    struct exec_domain *ed;
    2.73 -
    2.74 -    for_each_exec_domain ( d, ed )
    2.75 -    {
    2.76 -        if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    2.77 -            domain_wake(ed);
    2.78 -    }
    2.79 -}
    2.80 -
    2.81  #define IS_PRIV(_d)                                         \
    2.82      (test_bit(_DOMF_privileged, &(_d)->domain_flags))
    2.83  #define IS_CAPABLE_PHYSDEV(_d)                              \