| 66 | } |
| 67 | |
| 68 | void add_error_handler(ErrorHandlerList *p_handler) { |
| 69 | // If p_handler is already in error_handler_list |
| 70 | // we'd better remove it first then we can add it. |
| 71 | // This prevent cyclic redundancy. |
| 72 | remove_error_handler(p_handler); |
| 73 | |
| 74 | _global_lock(); |
| 75 | |
| 76 | p_handler->next = error_handler_list; |
| 77 | error_handler_list = p_handler; |
| 78 | |
| 79 | _global_unlock(); |
| 80 | } |
| 81 | |
| 82 | void remove_error_handler(const ErrorHandlerList *p_handler) { |
| 83 | _global_lock(); |