]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
RESCHED flag renamed to CHANGED
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Aug 2009 15:29:13 +0000 (17:29 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Aug 2009 15:29:13 +0000 (17:29 +0200)
This better represents the meaning of the flag.

fwp/lib/fwp/fwp_vres.c

index 7d18567146f305ec121742aef1997e658f6e7a95..4fcb21891e26259f1f131ef1a32a5224e1d74c93 100644 (file)
@@ -59,7 +59,7 @@ static void* fwp_vres_tx_thread(void *_vres);
 typedef enum {
        FWP_VF_USED             = 0,
        FWP_VF_BOUND            = 1,
-       FWP_VF_RESCHED          = 2,
+       FWP_VF_CHANGED          = 2,
 } fwp_vres_flag_t;
 
 fwp_vres_params_t fwp_vres_params_default = {
@@ -272,7 +272,7 @@ inline int _fwp_vres_set_params(fwp_vres_t *vres, fwp_vres_params_t *params)
        if (!rv)
                return rv;
        memcpy(&vres->params, params, sizeof(struct fwp_vres_params));
-       fwp_vres_set_flag(vres, FWP_VF_RESCHED);
+       fwp_vres_set_flag(vres, FWP_VF_CHANGED);
 
        return 0;
 }
@@ -323,7 +323,7 @@ int fwp_vres_create(fwp_vres_params_t *params, fwp_vres_d_t *vresdp)
        fwp_msgq_init(&vres->tx_queue);
        
        memcpy(&vres->params, params, sizeof(struct fwp_vres_params));
-       fwp_vres_set_flag(vres, FWP_VF_RESCHED);
+       fwp_vres_set_flag(vres, FWP_VF_CHANGED);
        pthread_attr_init(&vres->tx_thread_attr);
        if ((rv = pthread_create(&vres->tx_thread, &vres->tx_thread_attr, 
                            fwp_vres_tx_thread, (void*) vres)) != 0){
@@ -373,7 +373,7 @@ static inline void
 fwp_vres_sched_update(fwp_vres_t *vres, struct timespec *period, 
                        fwp_budget_t  *budget)
 {
-       if (fwp_vres_get_flag(vres, FWP_VF_RESCHED)) {  
+       if (fwp_vres_get_flag(vres, FWP_VF_CHANGED)) {  
                /*period->tv_nsec = vres->params.period % SEC_TO_USEC;
                period->tv_sec = vres->params.period / SEC_TO_USEC;*/
                *period = vres->params.period;
@@ -381,7 +381,7 @@ fwp_vres_sched_update(fwp_vres_t *vres, struct timespec *period,
                FWP_DEBUG("Vres tx thread with budget=%ld period_sec=%ld "
                                "period_nsec=%ld.\n",vres->params.budget, 
                                period->tv_sec, period->tv_nsec);
-               fwp_vres_clear_flag(vres, FWP_VF_RESCHED);
+               fwp_vres_clear_flag(vres, FWP_VF_CHANGED);
        }
 }