]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Fee, removed counter which is no longer used.
authorhebe <devnull@localhost>
Fri, 7 Sep 2012 07:27:04 +0000 (09:27 +0200)
committerhebe <devnull@localhost>
Fri, 7 Sep 2012 07:27:04 +0000 (09:27 +0200)
memory/Fee/Fee.c

index dd78574e0ee7e766f6eb9ee18131c6f1a824f46a..671ad4c0bf5b9caadeddb2d42dc146ffcd119ea0 100644 (file)
@@ -299,7 +299,6 @@ typedef enum {
 \r
 typedef struct {\r
        CurrentJobStateType                     State;\r
-       uint16                                          InStateCounter;\r
        uint16                                          BlockNumber;\r
        uint16                                          Length;\r
        const Fee_BlockConfigType       *BlockConfigPtr;\r
@@ -335,15 +334,12 @@ typedef struct {
 \r
 static CurrentJobType CurrentJob = {\r
                .State = FEE_IDLE,\r
-               .InStateCounter = 0\r
                //lint -e{785}          PC-Lint (785) - rest of structure members is initialized when used.\r
 };\r
 \r
 /*\r
  * Misc definitions\r
  */\r
-#define STATE_COUNTER_MAX                              0xffff\r
-#define GARBAGE_COLLECTION_DELAY               10\r
 #define MAX_NOF_FAILED_GC_ATTEMPTS             5\r
 /***************************************\r
  *           Local functions           *\r
@@ -1195,7 +1191,6 @@ void Fee_Init(void)
 \r
        /* State of device */\r
        CurrentJob.State = FEE_STARTUP_REQUESTED;\r
-       CurrentJob.InStateCounter = 0;\r
 #if (FEE_POLLING_MODE == STD_OFF)\r
        FlsJobReady = TRUE;\r
 #endif\r
@@ -1414,16 +1409,6 @@ Std_ReturnType Fee_EraseImmediateBlock(uint16 blockNumber)
  */\r
 void Fee_MainFunction(void)\r
 {\r
-       static CurrentJobStateType LastState = FEE_UNINITIALIZED;\r
-\r
-       if (CurrentJob.State == LastState) {\r
-               if (CurrentJob.InStateCounter < STATE_COUNTER_MAX) {\r
-                       CurrentJob.InStateCounter++;\r
-               }\r
-       } else {\r
-               LastState = CurrentJob.State;\r
-               CurrentJob.InStateCounter = 0;\r
-       }\r
 \r
        switch (CurrentJob.State) {\r
        case FEE_UNINITIALIZED:\r