Changeset 1614 for trunk/src/emx/include


Ignore:
Timestamp:
Nov 5, 2004, 3:16:17 AM (21 years ago)
Author:
bird
Message:

Non-working signal code. (better having it in CVS than locally now)

Location:
trunk/src/emx/include
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/sharedpm.h

    • Property cvs2svn:cvs-rev changed from 1.10 to 1.11
    r1613 r1614  
    598598 *
    599599 * @returns 0 on success.
    600  * @returns -1 and errno on failure.
     600 * @returns Negative error code (errno.h) on failure.
    601601 * @param   iSocket     The new socket.
    602602 */
     
    607607 *
    608608 * @returns The new reference count.
    609  * @returns -1 and errno on failure.
     609 * @returns Negative error code (errno.h) on failure.
    610610 * @param   iSocket     socket to reference.
    611611 */
     
    617617 * @returns The new reference count.
    618618 *          The caller must close the socket if 0 is returned.
    619  * @returns -1 and errno on failure.
     619 * @returns Negative error code (errno.h) on failure.
    620620 * @param   iSocket     Socket to dereference.
    621621 */
  • trunk/src/emx/include/InnoTekLIBC/signals.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1613 r1614  
    9797int         __libc_back_signalVerifyPGrp(pid_t pgid);
    9898int         __libc_back_signalSendPid(pid_t pid, int iSignalNo);
     99int         __libc_back_signalSendPidOther(pid_t pid, int iSignalNo);
    99100int         __libc_back_signalSendPGrp(pid_t pgrp, int iSignalNo);
    100101int         __libc_back_signalAction(int iSignalNo, const struct sigaction *pSigAct, struct sigaction *pSigActOld);
    101102unsigned    __libc_back_signalRaise(int iSignalNo, siginfo_t *pSigInfo, void *pvXcptOrQueued, unsigned fFlags);
    102103int         __libc_back_signalRaisePoked(void *pvXcptParams, int tidPoker);
     104void        __libc_back_signalOS2V1Handler16bit(unsigned short uSignal, unsigned short uArg);
     105void        __libc_back_signalOS2V1Handler32bit(unsigned uSignal, unsigned uArg);
    103106
    104107__END_DECLS
  • trunk/src/emx/include/InnoTekLIBC/thread.h

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r1613 r1614  
    6868    struct _uheap * pRegularHeap;
    6969    /** Reference count. */
    70     unsigned        cRefs;
     70    volatile unsigned cRefs;
    7171    /** Thread Id. */
    7272    unsigned        tid;
     
    145145     * read without owning the semaphore.
    146146     */
    147     unsigned        fSigBeingPoked;
     147    volatile unsigned   fSigBeingPoked;
    148148
    149149
     
    189189        struct __libc_sys
    190190        {
    191 #ifndef __NEW_SIGNALS__
    192             /** Blocked signal mask. */
    193             sigset_t            sig_blocked;
    194             /** Pending signal mask. */
    195             sigset_t            sig_pending;
    196             /** Signal actions. */
    197             struct sigaction    signals[NSIG];
    198 #endif /* !__NEW_SIGNALS__ */
    199191            /** Directory find data entry.
    200192             * Used by __findfirst() and __findnext(). */
  • trunk/src/emx/include/emx/syscalls.h

    • Property cvs2svn:cvs-rev changed from 1.14 to 1.15
    r1613 r1614  
    55
    66#include <sys/types.h>
    7 #ifdef __NEW_SIGNALS__
    87#include <sys/_sigset.h>
    9 #endif
    108
    119#if defined (__cplusplus)
     
    3129#define _SO_SYNC        0x00100000
    3230#define _SO_SIZE        0x00200000
    33 
    34 #ifndef __NEW_SIGNALS__
    35 #include <sys/types.h>
    36 /* For debugging of signal handlers. */
    37 #define _SIG_MAGIC1     0xfeed6666
    38 #define _SIG_MAGIC2     0x47dead11
    39 #define _SIG_MAGIC3     0x9999beef
    40 #define _SIG_MAGIC4     0xaffe0815
    41 
    42 #if !defined (_SIGSET_T)
    43 #define _SIGSET_T
    44 typedef unsigned long sigset_t;
    45 #endif
    46 #endif /* !__NEW_SIGNALS__ */
    47 
    4831
    4932struct hostent;
  • trunk/src/emx/include/signal.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1613 r1614  
    1 #ifdef __NEW_SIGNALS__
    21/** @file
    32 * FreeBSD 5.1
     
    136135#endif /* !_SIGNAL_H_ */
    137136
    138 #else  /* !__NEW_SIGNALS__ */
    139 
    140 /* signal.h (emx+gcc) */
    141 
    142 #ifndef _SIGNAL_H
    143 #define _SIGNAL_H
    144 #include <sys/cdefs.h>
    145 #include <sys/signal.h>
    146 
    147 #if __BSD_VISIBLE
    148 /*
    149  * XXX should enlarge these, if only to give empty names instead of bounds
    150  * errors for large signal numbers.
    151  */
    152 extern __const char *__const sys_signame[NSIG];
    153 extern __const char *__const sys_siglist[NSIG];
    154 extern __const int sys_nsig;
    155 #endif
    156 
    157 
    158 #endif /* not _SIGNAL_H */
    159 
    160 #endif /* !__NEW_SIGNALS__ */
  • trunk/src/emx/include/sys/select.h

    • Property cvs2svn:cvs-rev changed from 1.8 to 1.9
    r1613 r1614  
    1010
    1111#include <sys/cdefs.h>
    12 #ifdef __NEW_SIGNALS__
    1312#include <sys/_sigset.h>
    1413
     
    1817typedef __sigset_t sigset_t;
    1918#endif
    20 
    21 #else /* !__NEW_SIGNALS__ */
    22 
    23 /** Define sigset_t here for pselect(). */
    24 #if !defined (_SIGSET_T)
    25 #define _SIGSET_T
    26 typedef unsigned long sigset_t;
    27 #endif
    28 
    29 #endif /* !__NEW_SIGNALS__ */
    30 
    3119
    3220/** Define the number of file handles in the select buffer.
  • trunk/src/emx/include/sys/signal.h

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r1613 r1614  
    1 #ifdef __NEW_SIGNALS__
    21/* $Id: $ */
    32/** @file
     
    530529#endif /* not _SYS_SIGNAL_H */
    531530
    532 
    533 #else /* !__NEW_SIGNALS__ */
    534 
    535 
    536 /* sys/signal.h (emx+gcc) */
    537 
    538 #ifndef _SYS_SIGNAL_H
    539 #define _SYS_SIGNAL_H
    540 
    541 #if defined (__cplusplus)
    542 extern "C" {
    543 #endif
    544 
    545 typedef int sig_atomic_t;
    546 
    547 #define SIGHUP    1 /* Hangup */
    548 #define SIGINT    2 /* Interrupt (Ctrl-C) */
    549 #define SIGQUIT   3 /* Quit */
    550 #define SIGILL    4 /* Illegal instruction */
    551 #define SIGTRAP   5 /* Single step (debugging) */
    552 #define SIGABRT   6 /* abort () */
    553 #define SIGEMT    7 /* EMT instruction */
    554 #define SIGFPE    8 /* Floating point */
    555 #define SIGKILL   9 /* Kill process */
    556 #define SIGBUS   10 /* Bus error */
    557 #define SIGSEGV  11 /* Segmentation fault */
    558 #define SIGSYS   12 /* Invalid argument to system call */
    559 #define SIGPIPE  13 /* Broken pipe */
    560 #define SIGALRM  14 /* Alarm */
    561 #define SIGTERM  15 /* Termination, process killed */
    562 #define SIGUSR1  16 /* User-defined signal #1 */
    563 #define SIGUSR2  17 /* User-defined signal #2 */
    564 #define SIGCHLD  18 /* Death of a child process */
    565 #define SIGBREAK 21 /* Break (Ctrl-Break) */
    566 #define SIGWINCH 28 /* Window size change (not implemented) */
    567 
    568 #define SIGPTRACENOTIFY 128     /* Notification from ptrace() */
    569 
    570 #define SIGCLD   SIGCHLD
    571 
    572 #define SIG_DFL ((void (*)(int))0)
    573 #define SIG_IGN ((void (*)(int))1)
    574 #define SIG_ERR ((void (*)(int))-1)
    575 
    576 void (*signal (int, void (*)(int)))(int);
    577 int raise (int);
    578 
    579 
    580 #if !defined (__STRICT_ANSI__)
    581 
    582 #define NSIG 29
    583 
    584 #define SA_NOCLDSTOP    0x0001
    585 
    586 #define SIG_BLOCK       1
    587 #define SIG_UNBLOCK     2
    588 #define SIG_SETMASK     3
    589 
    590 #if !defined (_SIGSET_T)
    591 #define _SIGSET_T
    592 typedef unsigned long sigset_t;
    593 #endif
    594 
    595 struct sigaction
    596 {
    597   void (*sa_handler)(int);
    598   sigset_t sa_mask;
    599   int sa_flags;
    600 };
    601 
    602 
    603 int kill (int, int);
    604 int pause (void);
    605 
    606 int sigaction (int, __const__ struct sigaction *, struct sigaction *);
    607 int sigpending (sigset_t *);
    608 int sigprocmask (int, __const__ sigset_t *, sigset_t *);
    609 int sigsuspend (__const__ sigset_t *);
    610 
    611 int sigaddset (sigset_t *, int);
    612 int sigdelset (sigset_t *, int);
    613 int sigemptyset (sigset_t *);
    614 int sigfillset (sigset_t *);
    615 int sigismember (__const__ sigset_t *, int);
    616 
    617 #define _SIGMASK(sig) ((sigset_t)1 << ((sig) - 1))
    618 #define __sigaddset(set,sig)   (*(set) |= _SIGMASK (sig), 0)
    619 #define __sigdelset(set,sig)   (*(set) &= ~_SIGMASK (sig), 0)
    620 #define __sigemptyset(set)     (*(set) = 0, 0)
    621 #define __sigfillset(set)      (*(set) = ~(sigset_t)0, 0)
    622 #define __sigismember(set,sig) ((*(set) & _SIGMASK (sig)) ? 1 : 0)
    623 
    624 int _kill (int, int);
    625 int _pause (void);
    626 
    627 int _sigaction (int, __const__ struct sigaction *, struct sigaction *);
    628 int _sigpending (sigset_t *);
    629 int _sigprocmask (int, __const__ sigset_t *, sigset_t *);
    630 int _sigsuspend (__const__ sigset_t *);
    631 
    632 int _sigaddset (sigset_t *, int);
    633 int _sigdelset (sigset_t *, int);
    634 int _sigemptyset (sigset_t *);
    635 int _sigfillset (sigset_t *);
    636 int _sigismember (__const__ sigset_t *, int);
    637 
    638 #endif
    639 
    640 
    641 #if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) || defined(__USE_EMX)
    642 
    643 #define SIG_ACK ((void (*)(int))4)
    644 
    645 #define SA_SYSV         0x0002  /* Reset to SIG_DFL */
    646 #define SA_ACK          0x0004  /* Don't unblock automatically */
    647 
    648 #define SIGTY void
    649 
    650 #endif
    651 
    652 
    653 #include <sys/_types.h>
    654 
    655 typedef union sigval
    656 {
    657     int     sigval_int;
    658     void   *sigval_ptr;
    659 } sigval_t;
    660 
    661 typedef struct __siginfo
    662 {
    663     /** Signal number. */
    664     int             si_signo;
    665     /** Associated errno. */
    666     int             si_errno;
    667     /** Signal code. (See SI_* and FPE_* macros.) */
    668     int             si_code;
    669     /** Timestamp when the signal was generated - LIBC extension. */
    670     unsigned        si_timestamp;
    671     /** Process sending the signal. */
    672     __pid_t         si_pid;
    673     /** Thread sending the signal - LIBC extension. */
    674     unsigned        si_tid;
    675     /** User sending the signal (ruid). (Usually 0 for OS/2) */
    676     __uid_t         si_uid;
    677     /** Exit value. (SIGCHLD) */
    678     int             si_status;
    679     /** Pointer to the faulting instruction or memory reference. (SIGSEGV, SIGILL, SIGFPE, SIGBUS) */
    680     void           *si_addr;
    681     /** Signal value. */
    682     union sigval    si_value;
    683     /** Band event for SIGPOLL. */
    684     long            si_band;
    685     /** Filehandle for SIGPOLL. */
    686     int             si_fd;
    687     /** Reserve a little bit for future usage. */
    688     unsigned        auReserved[4];
    689 } siginfo_t;
    690 
    691 #if defined (__cplusplus)
    692 }
    693 #endif
    694 
    695 #endif /* not _SYS_SIGNAL_H */
    696 
    697 
    698 #endif /* !__NEW_SIGNALS__ */
Note: See TracChangeset for help on using the changeset viewer.