Changeset fac5697 in rtems-testing


Ignore:
Timestamp:
Feb 6, 2014, 8:25:23 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
13b0ee9
Parents:
af664fd
git-author:
Sebastian Huber <sebastian.huber@…> (02/06/14 08:25:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/24/14 12:44:30)
Message:

gcc/rtems_gcc_main.c: Add signal() workaround

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gcc/rtems_gcc_main.c

    raf664fd rfac5697  
    1313#include <sys/stat.h>
    1414#include <sys/types.h>
     15#include <pthread.h>
    1516
    1617/*
     
    2324int main(int argc, char **argv, char **environp);
    2425
     26/*
     27 * Tests like "gcc.c-torture/execute/20101011-1.c" use signal() and raise().
     28 * RTEMS ignores signals installed via signal() by default.  Enable SIGFPE for
     29 * the initialization thread as a workaround.
     30 */
     31static void signal_workaround(void)
     32{
     33  sigset_t set;
     34
     35  sigemptyset(&set);
     36  sigaddset(&set, SIGFPE);
     37  pthread_sigmask(SIG_UNBLOCK, &set, NULL);
     38}
     39
    2540rtems_task Init(rtems_task_argument ignored)
    2641{
     42  signal_workaround();
    2743  mkdir( "/tmp", 0777 );
    2844  main(argc, argv, NULL);
Note: See TracChangeset for help on using the changeset viewer.