1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026 Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
10 |
|
|
**************************************************************************/ |
11 |
|
|
// Some portions generated by Copilot (Claude Sonnet 4.6). |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/**************************************************************************/ |
16 |
|
|
/** */ |
17 |
|
|
/** GUIX Component */ |
18 |
|
|
/** */ |
19 |
|
|
/** System Management (System) */ |
20 |
|
|
/** */ |
21 |
|
|
/**************************************************************************/ |
22 |
|
|
|
23 |
|
|
#define GX_SOURCE_CODE |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
/* Include necessary system files. */ |
27 |
|
|
|
28 |
|
|
#include "gx_api.h" |
29 |
|
|
#include "gx_system.h" |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _gx_system_error_process PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function processes internal GUIX system errors. The main */ |
45 |
|
|
/* purpose of this routine is for troubleshooting, e.g., this routine */ |
46 |
|
|
/* keeps track of the number of system errors and the last system */ |
47 |
|
|
/* error code. In addition, the user may set a breakpoint on this */ |
48 |
|
|
/* routine to troubleshoot system errors. */ |
49 |
|
|
/* */ |
50 |
|
|
/* INPUT */ |
51 |
|
|
/* */ |
52 |
|
|
/* error_code System error code */ |
53 |
|
|
/* */ |
54 |
|
|
/* OUTPUT */ |
55 |
|
|
/* */ |
56 |
|
|
/* None */ |
57 |
|
|
/* */ |
58 |
|
|
/* CALLS */ |
59 |
|
|
/* */ |
60 |
|
|
/* None */ |
61 |
|
|
/* */ |
62 |
|
|
/* CALLED BY */ |
63 |
|
|
/* */ |
64 |
|
|
/* GUIX Internal Code */ |
65 |
|
|
/* */ |
66 |
|
|
/**************************************************************************/ |
67 |
|
98411 |
VOID _gx_system_error_process(UINT error_code) |
68 |
|
|
{ |
69 |
|
|
|
70 |
|
|
/* Increment the total number of system errors. */ |
71 |
|
98411 |
_gx_system_error_count++; |
72 |
|
|
|
73 |
|
|
/* Remember the last system error code. */ |
74 |
|
98411 |
_gx_system_last_error = error_code; |
75 |
|
|
|
76 |
|
|
#ifdef GX_DISABLE_THREADX_BINDING |
77 |
|
|
#ifdef GX_ENABLE_ERROR_CALLBACK |
78 |
|
|
GX_GENERIC_ERROR_PROCESS(error_code, _gx_system_error_count); |
79 |
|
|
#endif |
80 |
|
|
#endif |
81 |
|
98411 |
} |
82 |
|
|
|