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 #ifdef SEMA_BENCH
13 
14 /* semaphore signal speed test */
15 
16 /**
17  *
18  * @brief Receive task (Wait task)
19  *
20  */
waittask(void)21 void waittask(void)
22 {
23 	int i;
24 
25 	for (i = 0; i < NR_OF_SEMA_RUNS; i++) {
26 		k_sem_take(&SEM1, K_FOREVER);
27 	}
28 	for (i = 0; i < NR_OF_SEMA_RUNS; i++) {
29 		k_sem_take(&SEM1, K_MSEC(SEMA_WAIT_TIME));
30 	}
31 
32 }
33 
34 #endif /* SEMA_BENCH */
35