1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** POSIX wrapper for THREADX                                             */
17 /**                                                                       */
18 /**                                                                       */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 /* Include necessary system files.  */
24 
25 #include "tx_api.h"     /* Threadx API */
26 #include "pthread.h"    /* Posix API */
27 #include "px_int.h"     /* Posix helper functions */
28 
29 /**************************************************************************/
30 /*                                                                        */
31 /*  FUNCTION                                               RELEASE        */
32 /*                                                                        */
33 /*    posix_error_handler                                 PORTABLE C      */
34 /*                                                           6.1.7        */
35 /*  AUTHOR                                                                */
36 /*                                                                        */
37 /*    William E. Lamie, Microsoft Corporation                             */
38 /*                                                                        */
39 /*  DESCRIPTION                                                           */
40 /*                                                                        */
41 /*    This function is invoked whenever an error is encountered           */
42 /*    in the POSIX code.                                                  */
43 /*                                                                        */
44 /*  INPUT                                                                 */
45 /*                                                                        */
46 /*    error_code                            Error code to handle          */
47 /*                                                                        */
48 /*  OUTPUT                                                                */
49 /*                                                                        */
50 /*    None                                                                */
51 /*                                                                        */
52 /*  CALLS                                                                 */
53 /*                                                                        */
54 /*    None                                                                */
55 /*                                                                        */
56 /*  CALLED BY                                                             */
57 /*                                                                        */
58 /*    POSIX internal code                                                 */
59 /*                                                                        */
60 /*  RELEASE HISTORY                                                       */
61 /*                                                                        */
62 /*    DATE              NAME                      DESCRIPTION             */
63 /*                                                                        */
64 /*  06-02-2021     William E. Lamie         Initial Version 6.1.7         */
65 /*                                                                        */
66 /**************************************************************************/
posix_error_handler(ULONG error_code)67 VOID posix_error_handler(ULONG error_code)
68 {
69     while (error_code) { ; }
70 }
71 
72 /**************************************************************************/
73 /*                                                                        */
74 /*  FUNCTION                                               RELEASE        */
75 /*                                                                        */
76 /*    posix_internal_error                                PORTABLE C      */
77 /*                                                           6.1.7        */
78 /*  AUTHOR                                                                */
79 /*                                                                        */
80 /*    William E. Lamie, Microsoft Corporation                             */
81 /*                                                                        */
82 /*  DESCRIPTION                                                           */
83 /*                                                                        */
84 /*    This function is invoked whenever an error is encountered           */
85 /*    in the POSIX code.                                                  */
86 /*                                                                        */
87 /*  INPUT                                                                 */
88 /*                                                                        */
89 /*    error_code                            Error code to handle          */
90 /*                                                                        */
91 /*  OUTPUT                                                                */
92 /*                                                                        */
93 /*    None                                                                */
94 /*                                                                        */
95 /*  CALLS                                                                 */
96 /*                                                                        */
97 /*    None                                                                */
98 /*                                                                        */
99 /*  CALLED BY                                                             */
100 /*                                                                        */
101 /*    POSIX internal code                                                 */
102 /*                                                                        */
103 /*  RELEASE HISTORY                                                       */
104 /*                                                                        */
105 /*    DATE              NAME                      DESCRIPTION             */
106 /*                                                                        */
107 /*  06-02-2021     William E. Lamie         Initial Version 6.1.7         */
108 /*                                                                        */
109 /**************************************************************************/
posix_internal_error(ULONG error_code)110 VOID posix_internal_error(ULONG error_code)
111 {
112     while (error_code) { ; }
113 }
114