1 /* sema_r.c */ 2 3 /* 4 * Copyright (c) 1997-2010, 2013-2014 Wind River Systems, Inc. 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #include "receiver.h" 10 #include "master.h" 11 12 /* semaphore signal speed test */ 13 14 /** 15 * @brief Receive task (Wait task) 16 */ waittask(void)17void waittask(void) 18 { 19 int i; 20 21 for (i = 0; i < NR_OF_SEMA_RUNS; i++) { 22 k_sem_take(&SEM1, K_FOREVER); 23 } 24 25 for (i = 0; i < NR_OF_SEMA_RUNS; i++) { 26 k_sem_take(&SEM1, K_MSEC(SEMA_WAIT_TIME)); 27 } 28 29 } 30