Changeset 346810a in rtems-libbsd


Ignore:
Timestamp:
Oct 22, 2012, 7:43:57 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
25f7f0f
Parents:
7b43b62
git-author:
Joel Sherrill <joel.sherrill@…> (10/22/12 19:43:57)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/23/12 16:13:57)
Message:

netstat/if.c: Use POSIX not BSD signals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-userspace/commands/usr.bin/netstat/if.c

    r7b43b62 r346810a  
    713713        if ((noutputs != 0) && (--noutputs == 0))
    714714                exit(0);
    715 #ifndef __rtems__
     715#ifdef __rtems__
     716        {
     717        sigset_t oldmask, desired, empty;
     718
     719        sigemptyset(&empty);
     720        sigemptyset(&desired);
     721        sigaddset(&desired, SIGALRM);
     722        sigprocmask(SIG_BLOCK, &desired, &oldmask);
     723        while (!signalled)
     724                sigsuspend(&desired);
     725        signalled = NO;
     726        sigprocmask(SIG_SETMASK, &oldmask, NULL);
     727        }
     728#else
    716729        oldmask = sigblock(sigmask(SIGALRM));
    717730        while (!signalled)
     
    719732        signalled = NO;
    720733        sigsetmask(oldmask);
    721 #else
    722         #warning "Add BSD Signals wrapper"
    723734#endif
    724735        line++;
Note: See TracChangeset for help on using the changeset viewer.