blob: d6e7db9abc3c49a5aef275e7e7df3cf8318e2978 [file] [log] [blame]
/*
* Copyright (c) 2022 Huawei Technologies SASU
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#include <stdint.h>
#include <zephyr/kernel.h>
#include "user.h"
void context_switch_yield(void *p1, void *p2, void *p3)
{
uint32_t nb_threads = (uint32_t)(uintptr_t) p1;
uint32_t rounds = NB_YIELDS / nb_threads;
while (rounds--) {
k_yield();
}
}