[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Remove unused function find_last_domain().



ChangeSet 1.1371, 2005/03/25 14:00:59+00:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Remove unused function find_last_domain().
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 common/domain.c     |   27 +++------------------------
 include/xen/sched.h |    3 ---
 2 files changed, 3 insertions(+), 27 deletions(-)


diff -Nru a/xen/common/domain.c b/xen/common/domain.c
--- a/xen/common/domain.c       2005-03-25 10:05:02 -05:00
+++ b/xen/common/domain.c       2005-03-25 10:05:02 -05:00
@@ -41,7 +41,6 @@
 
     d->id          = dom_id;
     ed->processor  = cpu;
-    d->create_time = NOW();
  
     spin_lock_init(&d->time_lock);
 
@@ -107,28 +106,6 @@
 }
 
 
-/* Return the most recently created domain. */
-struct domain *find_last_domain(void)
-{
-    struct domain *d, *dlast;
-
-    read_lock(&domlist_lock);
-    dlast = domain_list;
-    d = dlast->next_list;
-    while ( d != NULL )
-    {
-        if ( d->create_time > dlast->create_time )
-            dlast = d;
-        d = d->next_list;
-    }
-    if ( !get_domain(dlast) )
-        dlast = NULL;
-    read_unlock(&domlist_lock);
-
-    return dlast;
-}
-
-
 #ifndef CONFIG_IA64
 extern void physdev_destroy_state(struct domain *d);
 #else
@@ -207,6 +184,7 @@
     raise_softirq(SCHEDULE_SOFTIRQ);
 }
 
+
 unsigned int alloc_new_dom_mem(struct domain *d, unsigned int kbytes)
 {
     unsigned int alloc_pfns, nr_pages;
@@ -349,7 +327,8 @@
 
     sched_add_domain(ed);
 
-    if ( (rc = arch_set_info_guest(ed, c)) != 0 ) {
+    if ( (rc = arch_set_info_guest(ed, c)) != 0 )
+    {
         sched_rem_domain(ed);
         goto out;
     }
diff -Nru a/xen/include/xen/sched.h b/xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   2005-03-25 10:05:02 -05:00
+++ b/xen/include/xen/sched.h   2005-03-25 10:05:02 -05:00
@@ -97,7 +97,6 @@
 struct domain
 {
     domid_t          id;
-    s_time_t         create_time;
 
     shared_info_t   *shared_info;     /* shared data area */
     spinlock_t       time_lock;
@@ -215,7 +214,6 @@
 extern int set_info_guest(struct domain *d, dom0_setdomaininfo_t *);
 
 struct domain *find_domain_by_id(domid_t dom);
-struct domain *find_last_domain(void);
 extern void domain_destruct(struct domain *d);
 extern void domain_kill(struct domain *d);
 extern void domain_shutdown(u8 reason);
@@ -400,7 +398,6 @@
 
 #include <xen/slab.h>
 #include <xen/domain.h>
-
 
 #endif /* __SCHED_H__ */
 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.