Reactos
at master 18 lines 355 B view raw
1// 2// atexit.c 3// 4// Copyright (c) 2024 Timo Kreuzer 5// 6// Implementation of atexit. 7// 8// SPDX-License-Identifier: MIT 9// 10 11#include <stdlib.h> 12 13int __cdecl atexit(void (__cdecl* _Func)(void)) 14{ 15 // Go through _onexit, so that the initializer is pulled in. 16 _onexit_t result = _onexit((_onexit_t)_Func); 17 return (result == NULL) ? -1 : 0; 18}