No more discrimination related with core0/core1. using get_core_num() returns the core number.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-12-24 01:38:09 +01:00
parent c0a540ae2b
commit a8fe504d14
5 changed files with 9 additions and 27 deletions

View File

@@ -168,19 +168,11 @@ uint32_t neug_get() {
return v;
}
void neug_wait_full(void) { //should be called only on core1
void neug_wait_full() {
struct rng_rb *rb = &the_ring_buffer;
uint core = get_core_num();
while (!rb->full) {
sleep_ms(1);
}
}
void neug_wait_full_ext(bool blocking) {
struct rng_rb *rb = &the_ring_buffer;
while (!rb->full) {
if (blocking == true)
if (core == 1)
sleep_ms(1);
else
neug_task();