Changeset 10aed1e3 in rtems for cpukit


Ignore:
Timestamp:
Jul 18, 1995, 7:58:45 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
217d2e7
Parents:
8044533
Message:

fixed for Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/unix/cpu.c

    r8044533 r10aed1e3  
    2525#include <signal.h>
    2626#include <time.h>
     27#include <sys/time.h>
    2728
    2829#ifndef SA_RESTART
     
    105106  sigaction(SIGQUIT, &act, 0);
    106107  sigaction(SIGILL, &act, 0);
     108#ifdef SIGEMT
    107109  sigaction(SIGEMT, &act, 0);
     110#endif
    108111  sigaction(SIGFPE, &act, 0);
    109112  sigaction(SIGKILL, &act, 0);
    110113  sigaction(SIGBUS, &act, 0);
    111114  sigaction(SIGSEGV, &act, 0);
     115#ifdef SIGSYS
    112116  sigaction(SIGSYS, &act, 0);
     117#endif
    113118  sigaction(SIGPIPE, &act, 0);
    114119  sigaction(SIGALRM, &act, 0);
     
    398403     *  This information was gathered by disassembling setjmp().
    399404     */
     405
     406    {
     407      unsigned32 stack_ptr;
     408
     409      stack_ptr = _stack_high - CPU_FRAME_SIZE;
     410
     411      *(addr + EBX_OFF) = 0xFEEDFEED;
     412      *(addr + ESI_OFF) = 0xDEADDEAD;
     413      *(addr + EDI_OFF) = 0xDEAFDEAF;
     414      *(addr + EBP_OFF) = stack_ptr;
     415      *(addr + ESP_OFF) = stack_ptr;
     416      *(addr + RET_OFF) = jmp_addr;
    400417 
    401     stack_ptr = _stack_high - CPU_FRAME_SIZE;
    402     *(addr + EBX_OFF) = 0xFEEDFEED;
    403     *(addr + ESI_OFF) = 0xDEADDEAD;
    404     *(addr + EDI_OFF) = 0xDEAFDEAF;
    405     *(addr + EBP_OFF) = stack_ptr;
    406     *(addr + ESP_OFF) = stack_ptr;
    407     *(addr + RET_OFF) = jmp_addr;
     418      addr = (unsigned32 *) stack_ptr;
    408419 
    409  
    410     addr = (unsigned32 *) stack_ptr;
    411  
    412     addr[ 0 ] = jmp_addr;
    413     addr[ 1 ] = (unsigned32) stack_ptr;
    414     addr[ 2 ] = (unsigned32) stack_ptr;
     420      addr[ 0 ] = jmp_addr;
     421      addr[ 1 ] = (unsigned32) stack_ptr;
     422      addr[ 2 ] = (unsigned32) stack_ptr;
     423    }
    415424
    416425#else
     
    583592      case SIGQUIT:
    584593      case SIGILL:
     594#ifdef SIGEMT
    585595      case SIGEMT:
     596#endif
    586597      case SIGKILL:
    587598      case SIGBUS:
Note: See TracChangeset for help on using the changeset viewer.