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)
5252{
5353 int ret ;
5454
55- while ((ret = sem_wait (semaphore )) == EINTR ) {
55+ while ((( ret = sem_wait (semaphore )) == -1 ) && ( errno == EINTR ) ) {
5656 /* Restart wait if we were interrupted */
5757 }
5858 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)
146146{
147147 int ret ;
148148
149- while ((ret = sem_wait (semaphore )) == EINTR ) {
149+ while ((( ret = sem_wait (semaphore )) == -1 ) && ( errno == EINTR ) ) {
150150 /* Restart wait if we were interrupted */
151151 }
152152 return ret ;
Original file line number Diff line number Diff line change 88#define NSI_COMMON_SRC_NSI_INTERNAL_H
99
1010#include <stdint.h>
11+ #include "nsi_utils.h"
1112
1213#ifdef __cplusplus
1314extern "C" {
@@ -23,8 +24,7 @@ extern "C" {
2324 *
2425 * @return least significant bit set, 0 if @a op is 0
2526 */
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 )
2828{
2929 return __builtin_ffs (op );
3030}
@@ -39,8 +39,7 @@ static inline unsigned int nsi_find_lsb_set(uint32_t op)
3939 *
4040 * @return least significant bit set, 0 if @a op is 0
4141 */
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 )
4443{
4544 return __builtin_ffsll (op );
4645}
You can’t perform that action at this time.
0 commit comments