@@ -323,6 +323,14 @@ namespace delegate
323
323
}
324
324
}
325
325
326
+ // / Calling is safe without checking for nullptr.
327
+ // / If non-void, returns the default value.
328
+ // / In ISR context, where faults and exceptions must not
329
+ // / occurs, this saves the extra check for nullptr,
330
+ // / and allows the compiler to optimize out checks
331
+ // / in std::function which may not be ISR-safe or
332
+ // / cause linker errors, like l32r relocation errors
333
+ // / on the Xtensa ISA.
326
334
R IRAM_ATTR operator ()(P... args) const
327
335
{
328
336
if (FP == kind)
@@ -538,6 +546,14 @@ namespace delegate
538
546
}
539
547
}
540
548
549
+ // / Calling is safe without checking for nullptr.
550
+ // / If non-void, returns the default value.
551
+ // / In ISR context, where faults and exceptions must not
552
+ // / occurs, this saves the extra check for nullptr,
553
+ // / and allows the compiler to optimize out checks
554
+ // / in std::function which may not be ISR-safe or
555
+ // / cause linker errors, like l32r relocation errors
556
+ // / on the Xtensa ISA.
541
557
R IRAM_ATTR operator ()(P... args) const
542
558
{
543
559
if (FP == kind)
@@ -746,6 +762,14 @@ namespace delegate
746
762
}
747
763
}
748
764
765
+ // / Calling is safe without checking for nullptr.
766
+ // / If non-void, returns the default value.
767
+ // / In ISR context, where faults and exceptions must not
768
+ // / occurs, this saves the extra check for nullptr,
769
+ // / and allows the compiler to optimize out checks
770
+ // / in std::function which may not be ISR-safe or
771
+ // / cause linker errors, like l32r relocation errors
772
+ // / on the Xtensa ISA.
749
773
R IRAM_ATTR operator ()(P... args) const
750
774
{
751
775
if (FP == kind)
@@ -846,6 +870,14 @@ namespace delegate
846
870
return reinterpret_cast <void *>(fn);
847
871
}
848
872
873
+ // / Calling is safe without checking for nullptr.
874
+ // / If non-void, returns the default value.
875
+ // / In ISR context, where faults and exceptions must not
876
+ // / occurs, this saves the extra check for nullptr,
877
+ // / and allows the compiler to optimize out checks
878
+ // / in std::function which may not be ISR-safe or
879
+ // / cause linker errors, like l32r relocation errors
880
+ // / on the Xtensa ISA.
849
881
inline R IRAM_ATTR operator ()(P... args) const __attribute__((always_inline))
850
882
{
851
883
if (fn) return fn (std::forward<P...>(args...));
@@ -1127,6 +1159,14 @@ namespace delegate
1127
1159
}
1128
1160
}
1129
1161
1162
+ // / Calling is safe without checking for nullptr.
1163
+ // / If non-void, returns the default value.
1164
+ // / In ISR context, where faults and exceptions must not
1165
+ // / occurs, this saves the extra check for nullptr,
1166
+ // / and allows the compiler to optimize out checks
1167
+ // / in std::function which may not be ISR-safe or
1168
+ // / cause linker errors, like l32r relocation errors
1169
+ // / on the Xtensa ISA.
1130
1170
R IRAM_ATTR operator ()() const
1131
1171
{
1132
1172
if (FP == kind)
@@ -1341,6 +1381,14 @@ namespace delegate
1341
1381
}
1342
1382
}
1343
1383
1384
+ // / Calling is safe without checking for nullptr.
1385
+ // / If non-void, returns the default value.
1386
+ // / In ISR context, where faults and exceptions must not
1387
+ // / occurs, this saves the extra check for nullptr,
1388
+ // / and allows the compiler to optimize out checks
1389
+ // / in std::function which may not be ISR-safe or
1390
+ // / cause linker errors, like l32r relocation errors
1391
+ // / on the Xtensa ISA.
1344
1392
R IRAM_ATTR operator ()() const
1345
1393
{
1346
1394
if (FP == kind)
@@ -1549,6 +1597,14 @@ namespace delegate
1549
1597
}
1550
1598
}
1551
1599
1600
+ // / Calling is safe without checking for nullptr.
1601
+ // / If non-void, returns the default value.
1602
+ // / In ISR context, where faults and exceptions must not
1603
+ // / occurs, this saves the extra check for nullptr,
1604
+ // / and allows the compiler to optimize out checks
1605
+ // / in std::function which may not be ISR-safe or
1606
+ // / cause linker errors, like l32r relocation errors
1607
+ // / on the Xtensa ISA.
1552
1608
R IRAM_ATTR operator ()() const
1553
1609
{
1554
1610
if (FP == kind)
@@ -1649,6 +1705,14 @@ namespace delegate
1649
1705
return nullptr ;
1650
1706
}
1651
1707
1708
+ // / Calling is safe without checking for nullptr.
1709
+ // / If non-void, returns the default value.
1710
+ // / In ISR context, where faults and exceptions must not
1711
+ // / occurs, this saves the extra check for nullptr,
1712
+ // / and allows the compiler to optimize out checks
1713
+ // / in std::function which may not be ISR-safe or
1714
+ // / cause linker errors, like l32r relocation errors
1715
+ // / on the Xtensa ISA.
1652
1716
inline R IRAM_ATTR operator ()() const __attribute__((always_inline))
1653
1717
{
1654
1718
if (fn) return fn ();
0 commit comments