fix rt_atomic_dec_and_test
This commit is contained in:
parent
8c5f24469c
commit
f543160ead
|
@ -206,6 +206,8 @@ static int platform_ofw_device_probe(void)
|
|||
|
||||
if (ofw_node_root)
|
||||
{
|
||||
rt_ofw_node_get(ofw_node_root);
|
||||
|
||||
err = platform_ofw_device_probe_once(ofw_node_root);
|
||||
|
||||
rt_ofw_node_put(ofw_node_root);
|
||||
|
@ -216,11 +218,13 @@ static int platform_ofw_device_probe(void)
|
|||
rt_ofw_node_put(node);
|
||||
}
|
||||
|
||||
rt_ofw_node_get(ofw_node_chosen);
|
||||
if ((node = rt_ofw_get_child_by_compatible(ofw_node_chosen, "simple-framebuffer")))
|
||||
{
|
||||
platform_ofw_device_probe_once(node);
|
||||
rt_ofw_node_put(node);
|
||||
}
|
||||
rt_ofw_node_get(ofw_node_chosen);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -203,7 +203,7 @@ rt_inline rt_atomic_t rt_soft_atomic_compare_exchange_strong(volatile rt_atomic_
|
|||
|
||||
rt_inline rt_bool_t rt_atomic_dec_and_test(volatile rt_atomic_t *ptr)
|
||||
{
|
||||
return rt_atomic_sub(ptr, 1) == 0;
|
||||
return rt_atomic_sub(ptr, 1) == 1;
|
||||
}
|
||||
|
||||
rt_inline rt_atomic_t rt_atomic_fetch_add_unless(volatile rt_atomic_t *ptr, rt_atomic_t a, rt_atomic_t u)
|
||||
|
|
Loading…
Reference in New Issue