MIPS support to sigsuspend and sigwait routines

Change-Id: I870e798ed7eac5a8c74e5784a670f3a4f24331a9
This commit is contained in:
Raghu Gandham
2012-08-09 10:49:32 -07:00
parent 0836a7ffb1
commit abd10011a7
4 changed files with 24 additions and 6 deletions

View File

@@ -47,6 +47,14 @@ int __rt_sigtimedwait(const sigset_t *uthese, siginfo_t *uinfo, const struct tim
int sigwait(const sigset_t *set, int *sig)
{
int ret;
#ifdef __mips__
/* use a union to get rid of aliasing warnings. On MIPS sigset_t is 128 bits */
union {
sigset_t kernel_sigset;
sigset_t dummy_sigset;
} u;
u.dummy_sigset = *set;
#else
/* use a union to get rid of aliasing warnings */
union {
unsigned long kernel_sigset[2];
@@ -55,6 +63,7 @@ int sigwait(const sigset_t *set, int *sig)
u.kernel_sigset[0] = *set;
u.kernel_sigset[1] = 0; /* no real-time signals supported ? */
#endif
for (;;)
{
/* __rt_sigtimedwait can return EAGAIN or EINTR, we need to loop