#include "syscall.h"
#include "pthread_impl.h"
#include "libc.h"
+#include "lock.h"
#include "ksigaction.h"
volatile int dummy_lock[1] = { 0 };
-__attribute__((__visibility__("hidden")))
+extern hidden volatile int __abort_lock[1];
+
weak_alias(dummy_lock, __abort_lock);
static int unmask_done;
memcpy(set, handler_set, sizeof handler_set);
}
+volatile int __eintr_valid_flag;
+
int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old)
{
struct k_sigaction ksa, ksa_old;
SIGPT_SET, 0, _NSIG/8);
unmask_done = 1;
}
+
+ if (!(sa->sa_flags & SA_RESTART)) {
+ a_store(&__eintr_valid_flag, 1);
+ }
}
/* Changing the disposition of SIGABRT to anything but
* SIG_DFL requires a lock, so that it cannot be changed