]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
Generic allocator: unify terminology (scheduler/allocator)
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 16 Apr 2009 20:58:10 +0000 (22:58 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 23 Apr 2009 11:20:52 +0000 (13:20 +0200)
In the past allocator was called scheduler and this name was not
completely replaced in the sources until now.

fres/resalloc/fra_generic.c
fres/resalloc/fres_vres.h

index 876363000ff5f8c8735709e2570c96ae73123291..83feb0fe6814b894cd7b60d9ef647fc6a97000fb 100644 (file)
@@ -139,7 +139,7 @@ CORBA_long change_vreses(fres_resource_allocator obj,
        int ret;
        unsigned len = contracts->_length;
        unsigned i;
-       struct fres_allocator *sch = forb_instance_data(obj);
+       struct fres_allocator *alloc = forb_instance_data(obj);
        struct fres_vres **vreses;
 
        /* Prepare the vres structures */
@@ -168,14 +168,14 @@ CORBA_long change_vreses(fres_resource_allocator obj,
                        assert(ret > 0); /* Nobody else inserted the same vres. */
                }
                vres->new = contract;
-               vres->allocator = sch;
+               vres->allocator = alloc;
                vreses[i] = vres;
        }
 
        /* Apply the changes */
-       if (sch->apply_vres_changes) {
+       if (alloc->apply_vres_changes) {
                /* Full interface */
-               ret = sch->apply_vres_changes(vreses, len, sch->priv);
+               ret = alloc->apply_vres_changes(vreses, len, alloc->priv);
                if (ret) {
                        ul_logerr("apply_vres_changes failed %d\n", ret);
                        goto err_free_vreses;
@@ -186,13 +186,13 @@ CORBA_long change_vreses(fres_resource_allocator obj,
                        struct fres_vres *vres = vreses[i];
                        if (vres->allocated) {
                                struct fres_contract *last_perceived = vres->perceived;
-                               ret = sch->change_vres(vreses[i], sch->priv);
+                               ret = alloc->change_vres(vreses[i], alloc->priv);
                                if (last_perceived == vres->perceived) {
                                        ul_logerr("change_vres callback did not change the perceived vres!");
                                        vres->perceived = vres->new;
                                }       
                        } else {
-                               ret = sch->create_vres(vreses[i], sch->priv);
+                               ret = alloc->create_vres(vreses[i], alloc->priv);
                                vres->perceived = vres->new;
                        }
                        if (ret) {
@@ -225,7 +225,7 @@ CORBA_long cancel_vreses(fres_resource_allocator obj,
                         CORBA_Environment *ev)
 {
        int ret, i;
-       struct fres_allocator *sch = forb_instance_data(obj);
+       struct fres_allocator *alloc = forb_instance_data(obj);
 
        for (i=0; i < ids->_length; i++) {
                struct fres_vres *vres;
@@ -234,7 +234,7 @@ CORBA_long cancel_vreses(fres_resource_allocator obj,
                vres = fres_vreses_find(id);
                if (!vres) goto err;
 
-               ret = sch->cancel_vres(vres, sch->priv);
+               ret = alloc->cancel_vres(vres, alloc->priv);
                if (ret != 0) goto err;
 
                fres_vreses_delete(vres);
index 088ffc3be925b1c22405a0aabe303b0cbfa1ca76..e468a32f23165ebf63abfa6633c8bf67303cbdb9 100644 (file)
@@ -91,7 +91,7 @@ typedef struct fres_vres {
 
        /**
         * The schedulable contract received by the allocator. The
-        * shceduler callback should use this contract to
+        * allocator callbacks should use this contract to
         * create/change VRES and must not change the value of this
         * field.
         */