Changeset 2204 for trunk/src/emx/include


Ignore:
Timestamp:
Jul 4, 2005, 3:17:39 AM (20 years ago)
Author:
bird
Message:

panic enh.

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

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.25 to 1.26
    r2203 r2204  
    3838#include <signal.h>
    3939#include <emx/io.h>
     40#include <stdarg.h>
    4041
    4142
     
    10401041/** @} */
    10411042
     1043
     1044/** @defgroup grp_Back_panic    LIBC Backend - Panic Routines
     1045 * @{ */
     1046
     1047/** The panic was caused by a signal. Drop the LIBC PANIC line. */
     1048#define __LIBC_PANIC_SIGNAL         1
     1049/** Don't set the SPM termination code / status. When set the caller is
     1050 * responsible for doing this. */
     1051#define __LIBC_PANIC_NO_SPM_TERM    2
     1052
     1053/**
     1054 * Print a panic message and dump/kill the process.
     1055 *
     1056 * @param   fFlags      A combination of the __LIBC_PANIC_* defines.
     1057 * @param   pvCtx       Pointer to a context record if available. This is a PCONTEXTRECORD.
     1058 * @param   pszFormat   User message which may contain %s and %x.
     1059 * @param   ...         String pointers and unsigned intergers as specified by the %s and %x in pszFormat.
     1060 */
     1061void __libc_Back_panic(unsigned fFlags, void *pvCtx, const char *pszFormat, ...) __attribute__((__noreturn__));
     1062
     1063/**
     1064 * Print a panic message and dump/kill the process.
     1065 *
     1066 * @param   fFlags      A combination of the __LIBC_PANIC_* defines.
     1067 * @param   pvCtx       Pointer to a context record if available. This is a PCONTEXTRECORD.
     1068 * @param   pszFormat   User message which may contain %s and %x.
     1069 * @param   args        String pointers and unsigned intergers as specified by the %s and %x in pszFormat.
     1070 */
     1071void __libc_Back_panicV(unsigned fFlags, void *pvCtx, const char *pszFormat, va_list args) __attribute__((__noreturn__));
     1072
     1073/* @} */
     1074
    10421075__END_DECLS
    10431076
  • trunk/src/emx/include/emx/umalloc.h

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r2203 r2204  
    807807
    808808
    809 static __inline__ void _um_abort (const char *pszmsg)
    810 {
    811   /* Use the 'syscall' write for safest possible path. */
    812   extern int __write (int handle, const void *buf, size_t nbytes);
    813   __write (2, "\r\n!_um_abort!", 13);
    814   if (pszmsg)
    815     {
    816       const char *psz = pszmsg;
    817       while (*psz)
    818         psz++;
    819       __write (2, " ", 1);
    820       __write (2, pszmsg, psz - pszmsg);
    821     }
    822   __write (2, "\r\n", 2);
    823   __asm__ __volatile__ ("int $3");
    824 }
    825 
     809void _um_abort (const char *, ...)  __attribute__((__noreturn__));
    826810
    827811#if defined (__cplusplus)
Note: See TracChangeset for help on using the changeset viewer.