mirror of https://github.com/ARMmbed/mbed-os.git
queue test: add counter overflow protect
without this fix test_equeue_break_no_windup was failing on IARpull/11342/head
parent
6440aea843
commit
b45d6d6a76
|
@ -39,7 +39,10 @@ static void pass_func(void *eh)
|
|||
|
||||
static void simple_func(void *p)
|
||||
{
|
||||
(*(reinterpret_cast<uint8_t *>(p)))++;
|
||||
uint8_t *d = reinterpret_cast<uint8_t *>(p);
|
||||
if (*d < 255) {
|
||||
(*d)++;
|
||||
}
|
||||
}
|
||||
|
||||
static void sloth_func(void *p)
|
||||
|
|
|
@ -45,7 +45,10 @@ static void pass_func(void *eh)
|
|||
|
||||
static void simple_func(void *p)
|
||||
{
|
||||
(*(reinterpret_cast<uint8_t *>(p)))++;
|
||||
uint8_t *d = reinterpret_cast<uint8_t *>(p);
|
||||
if (*d < 255) {
|
||||
(*d)++;
|
||||
}
|
||||
}
|
||||
|
||||
static void sloth_func(void *p)
|
||||
|
|
Loading…
Reference in New Issue