2 * PROJECT: ReactOS C runtime library
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: lib/sdk/crt/stdlib/_set_abort_behavior.c
5 * PURPOSE: _set_abort_behavior implementation
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
9 extern unsigned int __abort_behavior
;
12 * \brief Specifies the behavior of the abort() function.
14 * \param flags - Value of the new flags.
15 * \param mask - Mask that specifies which flags to update.
16 * \return The old flags value.
24 unsigned int old_flags
;
26 /* Save the old flags */
27 old_flags
= __abort_behavior
;
29 /* Reset all flags that are not in the mask */
32 /* Update the flags in the mask to the new flags value */
33 __abort_behavior
&= ~mask
;
34 __abort_behavior
|= flags
;
36 /* Return the old flags */