Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/native_simulator/common/src/nce.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ NSI_INLINE int nce_sem_rewait(sem_t *semaphore)
{
int ret;

while ((ret = sem_wait(semaphore)) == EINTR) {
while (((ret = sem_wait(semaphore)) == -1) && (errno == EINTR)) {
/* Restart wait if we were interrupted */
}
return ret;
Expand Down
2 changes: 1 addition & 1 deletion scripts/native_simulator/common/src/nct.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ NSI_INLINE int nct_sem_rewait(sem_t *semaphore)
{
int ret;

while ((ret = sem_wait(semaphore)) == EINTR) {
while (((ret = sem_wait(semaphore)) == -1) && (errno == EINTR)) {
/* Restart wait if we were interrupted */
}
return ret;
Expand Down
7 changes: 3 additions & 4 deletions scripts/native_simulator/common/src/nsi_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define NSI_COMMON_SRC_NSI_INTERNAL_H

#include <stdint.h>
#include "nsi_utils.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -23,8 +24,7 @@ extern "C" {
*
* @return least significant bit set, 0 if @a op is 0
*/

static inline unsigned int nsi_find_lsb_set(uint32_t op)
NSI_INLINE unsigned int nsi_find_lsb_set(uint32_t op)
{
return __builtin_ffs(op);
}
Expand All @@ -39,8 +39,7 @@ static inline unsigned int nsi_find_lsb_set(uint32_t op)
*
* @return least significant bit set, 0 if @a op is 0
*/

static inline unsigned int nsi_find_lsb_set64(uint64_t op)
NSI_INLINE unsigned int nsi_find_lsb_set64(uint64_t op)
{
return __builtin_ffsll(op);
}
Expand Down
Loading