1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Add hooks to feed watchdog during lengthy bigint operations

This commit is contained in:
Ivan Grokhotkov
2016-05-10 23:00:33 +08:00
parent 69c757f2a3
commit cd6c04a809
3 changed files with 7 additions and 0 deletions

View File

@ -1218,6 +1218,7 @@ bigint *bi_mont(BI_CTX *ctx, bigint *bixy)
check(bixy);
ax_wdt_feed();
if (ctx->use_classical) /* just use classical instead */
{
return bi_mod(ctx, bixy);
@ -1274,6 +1275,7 @@ bigint *bi_barrett(BI_CTX *ctx, bigint *bi)
check(bi);
check(bim);
ax_wdt_feed();
/* use Classical method instead - Barrett cannot help here */
if (bi->size > k*2)
{