ReactOS  0.4.14-dev-358-gbef841c
rterror.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _RT_STACK   0 /* stack overflow */
 
#define _RT_NULLPTR   1 /* null pointer assignment */
 
#define _RT_FLOAT   2 /* floating point not loaded */
 
#define _RT_INTDIV   3 /* integer divide by 0 */
 
#define _RT_SPACEARG   4 /* not enough space for arguments */
 
#define _RT_SPACEENV   5 /* not enough space for environment */
 
#define _RT_ABORT   6 /* abnormal program termination */
 
#define _RT_THREAD   7 /* not enough space for thread data */
 
#define _RT_LOCK   8 /* unexpected multi-thread lock error */
 
#define _RT_HEAP   9 /* unexpected heap error */
 
#define _RT_OPENCON   10 /* unable to open console device */
 
#define _RT_NONCONT   11 /* non-continuable exception */
 
#define _RT_INVALDISP   12 /* invalid disposition of exception */
 
#define _RT_ONEXIT
 
#define _RT_PUREVIRT
 
#define _RT_STDIOINIT   15 /* not enough space for stdio initialization */
 
#define _RT_LOWIOINIT   16 /* not enough space for lowio initialization */
 

Functions

 __declspec (noreturn) void _amsg_exit(int errnum)
 
void _dosmaperr (unsigned long oserrcode)
 

Macro Definition Documentation

◆ _RT_ABORT

#define _RT_ABORT   6 /* abnormal program termination */

Definition at line 13 of file rterror.h.

◆ _RT_FLOAT

#define _RT_FLOAT   2 /* floating point not loaded */

Definition at line 9 of file rterror.h.

◆ _RT_HEAP

#define _RT_HEAP   9 /* unexpected heap error */

Definition at line 16 of file rterror.h.

◆ _RT_INTDIV

#define _RT_INTDIV   3 /* integer divide by 0 */

Definition at line 10 of file rterror.h.

◆ _RT_INVALDISP

#define _RT_INVALDISP   12 /* invalid disposition of exception */

Definition at line 19 of file rterror.h.

◆ _RT_LOCK

#define _RT_LOCK   8 /* unexpected multi-thread lock error */

Definition at line 15 of file rterror.h.

◆ _RT_LOWIOINIT

#define _RT_LOWIOINIT   16 /* not enough space for lowio initialization */

Definition at line 26 of file rterror.h.

◆ _RT_NONCONT

#define _RT_NONCONT   11 /* non-continuable exception */

Definition at line 18 of file rterror.h.

◆ _RT_NULLPTR

#define _RT_NULLPTR   1 /* null pointer assignment */

Definition at line 8 of file rterror.h.

◆ _RT_ONEXIT

#define _RT_ONEXIT
Value:
13 /* insufficient heap to allocate
* initial table of function pointers
* used by _onexit()/atexit(). */

Definition at line 20 of file rterror.h.

◆ _RT_OPENCON

#define _RT_OPENCON   10 /* unable to open console device */

Definition at line 17 of file rterror.h.

◆ _RT_PUREVIRT

#define _RT_PUREVIRT
Value:
14 /* pure virtual function call attempted
* (C++ error) */

Definition at line 23 of file rterror.h.

◆ _RT_SPACEARG

#define _RT_SPACEARG   4 /* not enough space for arguments */

Definition at line 11 of file rterror.h.

◆ _RT_SPACEENV

#define _RT_SPACEENV   5 /* not enough space for environment */

Definition at line 12 of file rterror.h.

◆ _RT_STACK

#define _RT_STACK   0 /* stack overflow */

Definition at line 7 of file rterror.h.

◆ _RT_STDIOINIT

#define _RT_STDIOINIT   15 /* not enough space for stdio initialization */

Definition at line 25 of file rterror.h.

◆ _RT_THREAD

#define _RT_THREAD   7 /* not enough space for thread data */

Definition at line 14 of file rterror.h.

Function Documentation

◆ __declspec()

__declspec ( noreturn  )

Definition at line 53 of file thread.c.

58 {
59  /* Attempt to call the Thread Start Address */
60  _SEH2_TRY
61  {
62  /* Legacy check which is still used today for Win32 threads */
63  if (NtCurrentTeb()->NtTib.Version == (30 << 8)) // OS/2 V3.0 ("Cruiser")
64  {
65  /* This registers the termination port with CSRSS */
67  }
68 
69  /* Get the exit code from the Thread Start */
70  ExitThread((lpStartAddress)((PVOID)lpParameter));
71  }
73  {
74  /* Get the Exit code from the SEH Handler */
76  {
77  /* Kill the whole process, usually */
79  }
80  else
81  {
82  /* If running inside CSRSS, kill just this thread */
84  }
85  }
86  _SEH2_END;
87 }
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1487
_SEH2_TRY
Definition: create.c:4250
LONG WINAPI UnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
Definition: except.c:262
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:11
VOID WINAPI ExitThread(IN DWORD uExitCode)
Definition: thread.c:364
BOOLEAN BaseRunningInServerProcess
Definition: dllmain.c:20
LPVOID lpParameter
Definition: kernel32.h:241
NTSTATUS NTAPI CsrNewThread(VOID)
Definition: api.c:27
_SEH2_END
Definition: create.c:4424
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12

◆ _dosmaperr()

void _dosmaperr ( unsigned long  oserrcode)

Definition at line 81 of file errno.c.

82 {
83  int pos, base, lim;
84 
85  _set_doserrno(oserror);
86 
87  /* Use binary chop to find the corresponding errno code */
88  for (base=0, lim=sizeof(doserrmap)/sizeof(doserrmap[0]); lim; lim >>= 1) {
89  pos = base+(lim >> 1);
90  if (doserrmap[pos].winerr == oserror) {
92  return;
93  } else if (doserrmap[pos].winerr < oserror) {
94  base = pos + 1;
95  --lim;
96  }
97  }
98  /* EINVAL appears to be the default */
100 }
Definition: arc.h:39
int en
Definition: doserrmap.h:8
errno_t CDECL _set_doserrno(unsigned long value)
Definition: errno.c:68
GLuint base
Definition: 3dtext.c:35
errno_t CDECL _set_errno(int value)
Definition: errno.c:59
struct @3933 doserrmap[]
unsigned long winerr
Definition: doserrmap.h:7

Referenced by _access(), _beginthreadex(), _chdrive(), _chmod(), _chsize_s(), _close(), _commit(), _cwait(), _dup2(), _findclose(), _fstat64(), _futime(), _heapchk(), _heapmin(), _heapwalk(), _lseeki64(), _open_osfhandle(), _pclose(), _pipe(), _tchdir(), _tfindfirst(), _tfindnext(), _tfullpath(), _tgetcwd(), _tmkdir(), _trmdir(), _tsearchenv_s(), _unlink(), _waccess(), _wchmod(), _wfreopen(), _wremove(), _wrename(), _write(), _wsopen_s(), _wunlink(), access_dirT(), do_spawnT(), read_utf8(), remove(), rename(), and system().