File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
scripts/native_simulator/common/src Expand file tree Collapse file tree 4 files changed +5
-6
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ NSI_INLINE int nce_sem_rewait(sem_t *semaphore)
52
52
{
53
53
int ret ;
54
54
55
- while ((ret = sem_wait (semaphore )) == EINTR ) {
55
+ while ((( ret = sem_wait (semaphore )) == -1 ) && ( errno == EINTR ) ) {
56
56
/* Restart wait if we were interrupted */
57
57
}
58
58
return ret ;
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ NSI_INLINE int nct_sem_rewait(sem_t *semaphore)
146
146
{
147
147
int ret ;
148
148
149
- while ((ret = sem_wait (semaphore )) == EINTR ) {
149
+ while ((( ret = sem_wait (semaphore )) == -1 ) && ( errno == EINTR ) ) {
150
150
/* Restart wait if we were interrupted */
151
151
}
152
152
return ret ;
Original file line number Diff line number Diff line change 8
8
#define NSI_COMMON_SRC_NSI_INTERNAL_H
9
9
10
10
#include <stdint.h>
11
+ #include "nsi_utils.h"
11
12
12
13
#ifdef __cplusplus
13
14
extern "C" {
@@ -23,8 +24,7 @@ extern "C" {
23
24
*
24
25
* @return least significant bit set, 0 if @a op is 0
25
26
*/
26
-
27
- static inline unsigned int nsi_find_lsb_set (uint32_t op )
27
+ NSI_INLINE unsigned int nsi_find_lsb_set (uint32_t op )
28
28
{
29
29
return __builtin_ffs (op );
30
30
}
@@ -39,8 +39,7 @@ static inline unsigned int nsi_find_lsb_set(uint32_t op)
39
39
*
40
40
* @return least significant bit set, 0 if @a op is 0
41
41
*/
42
-
43
- static inline unsigned int nsi_find_lsb_set64 (uint64_t op )
42
+ NSI_INLINE unsigned int nsi_find_lsb_set64 (uint64_t op )
44
43
{
45
44
return __builtin_ffsll (op );
46
45
}
You can’t perform that action at this time.
0 commit comments