]> Git Repo - u-boot.git/blobdiff - lib/lzma/LzmaDec.c
clk: renesas: Synchronize R8A77980 V3H clock tables with Linux 6.5.3
[u-boot.git] / lib / lzma / LzmaDec.c
index 4f45f80fe26477f04b516cff23ffb417551cd30d..a90b35c6a993b96353cd57cc7b80308145d824bc 100644 (file)
@@ -152,8 +152,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
   const Byte *buf = p->buf;
   UInt32 range = p->range;
   UInt32 code = p->code;
-
-  WATCHDOG_RESET();
+  unsigned int loop = 0;
 
   do
   {
@@ -162,6 +161,9 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
     unsigned ttt;
     unsigned posState = processedPos & pbMask;
 
+    if (!(loop++ & 1023))
+           schedule();
+
     prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
     IF_BIT_0(prob)
     {
@@ -177,8 +179,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
         state -= (state < 4) ? state : 3;
         symbol = 1;
 
-        WATCHDOG_RESET();
-
         do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
       }
       else
@@ -188,8 +188,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
         state -= (state < 10) ? 3 : 6;
         symbol = 1;
 
-        WATCHDOG_RESET();
-
         do
         {
           unsigned bit;
@@ -321,8 +319,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
               UInt32 mask = 1;
               unsigned i = 1;
 
-              WATCHDOG_RESET();
-
               do
               {
                 GET_BIT2(prob + i, i, ; , distance |= mask);
@@ -335,8 +331,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
           {
             numDirectBits -= kNumAlignBits;
 
-            WATCHDOG_RESET();
-
             do
             {
               NORMALIZE
@@ -409,8 +403,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
           const Byte *lim = dest + curLen;
           dicPos += curLen;
 
-          WATCHDOG_RESET();
-
           do
             *(dest) = (Byte)*(dest + src);
           while (++dest != lim);
@@ -418,8 +410,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
         else
         {
 
-          WATCHDOG_RESET();
-
           do
           {
             dic[dicPos++] = dic[pos];
@@ -433,7 +423,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
   }
   while (dicPos < limit && buf < bufLimit);
 
-  WATCHDOG_RESET();
+  schedule();
 
   NORMALIZE;
   p->buf = buf;
This page took 0.031763 seconds and 4 git commands to generate.