Changeset 238 for rtos_arduino


Ignore:
Timestamp:
May 10, 2016, 2:09:19 PM (8 years ago)
Author:
ertl-honda
Message:

ラウンドロビンのマクロの見直し

Location:
rtos_arduino/trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtos_arduino/trunk/lib/rca_lib.cpp

    r220 r238  
    7575extern const DeviceVectors exception_table;
    7676
    77 #ifdef RCA_RR_SCEDULE
     77#ifdef RCA_RR_SCHEDULE
    7878static uint32_t time_slice = 0;
    79 #endif /* RCA_RR_SCEDULE */
     79#endif /* RCA_RR_SCHEDULE */
    8080
    8181/*
     
    8585rca_CycHandler(intptr_t exinf)
    8686{   
    87 #ifdef RCA_RR_SCEDULE
     87#ifdef RCA_RR_SCHEDULE
    8888    int i;
    89     if (++time_slice == RCA_RR_SCEDULE_CYCLE) {
     89    if (++time_slice == RCA_RR_SCHEDULE_CYCLE) {
    9090        time_slice = 0;
    9191        for(i = 1; i < 16; i++){
    92             if (RCA_RR_SCEDULE & (i << i)) {
     92            if (RCA_RR_SCHEDULE & (1 << i)) {
    9393                irot_rdq(i);
    9494            }
    9595        }
    9696    }
    97 #endif /* RCA_RR_SCEDULE */
     97#endif /* RCA_RR_SCHEDULE */
    9898#ifdef RCA_ENABLE_PROFILING   
    9999    rca_di();
     
    260260void
    261261yield(void){
    262 #ifdef RCA_RR_SCEDULE   
     262#ifdef RCA_RR_SCHEDULE   
    263263    time_slice = 0;
    264 #endif /* RCA_RR_SCEDULE */
     264#endif /* RCA_RR_SCHEDULE */
    265265#ifdef RCA_ENABLE_PROFILING
    266266    rca_di();
  • rtos_arduino/trunk/lib/rca_lib.h

    r196 r238  
    100100#endif  /* RCA_TASK5_STACK_SIZE */
    101101
     102
     103/*
     104 *  Round Robin Scheduling cycle
     105 */
     106#ifndef RCA_RR_SCHEDULE_CYCLE
     107#define RCA_RR_SCHEDULE_CYCLE 1
     108#endif /* RCA_RR_SCHEDULE_CYCLE */
     109 
    102110#ifdef __cplusplus
    103111extern "C" {
Note: See TracChangeset for help on using the changeset viewer.