2 * Copyright 2001-2011, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold (bonefish@users.sf.net)
9 //! Global library initialization/termination routines.
16 #include <LooperList.h>
17 #include <MessagePrivate.h>
18 #include <RosterPrivate.h>
19 #include <TokenSpace.h>
22 extern void __initialize_locale_kit();
32 initialize_forked_child()
34 DBG(OUT("initialize_forked_child()\n"));
36 BMessage::Private::StaticReInitForkedChild();
37 BPrivate::gLooperList
.InitAfterFork();
38 BPrivate::gDefaultTokens
.InitAfterFork();
39 BPrivate::init_team_after_fork();
41 DBG(OUT("initialize_forked_child() done\n"));
48 DBG(OUT("initialize_before()\n"));
50 BMessage::Private::StaticInit();
51 BRoster::Private::InitBeRoster();
53 atfork(initialize_forked_child
);
55 DBG(OUT("initialize_before() done\n"));
62 DBG(OUT("initialize_after()\n"));
64 __initialize_locale_kit();
66 DBG(OUT("initialize_after() done\n"));
73 DBG(OUT("terminate_after()\n"));
75 BRoster::Private::DeleteBeRoster();
76 BMessage::Private::StaticCleanup();
77 BMessage::Private::StaticCacheCleanup();
79 DBG(OUT("terminate_after() done\n"));