<commit_before>/**
 * Auto initialization for used modules
 *
 * Copyright (C) 2020 Freie Universität Berlin
 *               2020 <NAME> <<EMAIL>>
 *               2013  INRIA.
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 *
 * @ingroup sys_auto_init
 * @{
 * @file
 * @brief   initializes any used module that has a trivial init function
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <hauke.petersen@fu-berlin.de>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <m.lenders@fu-berlin.de>
 * @}
 */
#include <stdint.h>
#include <stdio.h>

#include "auto_init.h"
#include "kernel_defines.h"
#include "log.h"

void auto_init(void)
{
    if (IS_USED(MODULE_AUTO_INIT_RANDOM)) {
        LOG_DEBUG("Auto init random.\n");
        extern void auto_init_random(void);
        auto_init_random();
    }
    if (IS_USED(MODULE_AUTO_INIT_ZTIMER)) {
        LOG_DEBUG("Auto init ztimer.\n");
        void ztimer_init(void);
        ztimer_init();
    }
    if (IS_USED(MODULE_AUTO_INIT_XTIMER) &&
            !IS_USED(MODULE_ZTIMER_XTIMER_COMPAT)) {
        LOG_DEBUG("Auto init xtimer.\n");
        extern void xtimer_init(void);
        xtimer_init();
    }
    if (IS_USED(MODULE_SCHEDSTATISTICS)) {
        LOG_DEBUG("Auto init schedstatistics.\n");
        extern void init_schedstatistics(void);
        init_schedstatistics();
    }
    if (IS_USED(MODULE_DUMMY_THREAD)) {
        extern void dummy_thread_create(void);
        dummy_thread_create();
    }
    if (IS_USED(MODULE_EVENT_THREAD)) {
        LOG_DEBUG("Auto init event threads.\n");
        extern void auto_init_event_thread(void);
        auto_init_event_thread();
    }
    if (IS_USED(MODULE_SYS_BUS)) {
        LOG_DEBUG("Auto init system buses.\n");
        extern void auto_init_sys_bus(void);
        auto_init_sys_bus();
    }
    if (IS_USED(MODULE_MCI)) {
        LOG_DEBUG("Auto init mci.\n");
        extern void mci_initialize(void);
        mci_initialize();
    }
    if (IS_USED(MODULE_PROFILING)) {
        LOG_DEBUG("Auto init profiling.\n");
        extern void profiling_init(void);<commit_msg>sys/auto_init: init ztimer/xtimer before random<commit_after>/**
 * Auto initialization for used modules
 *
 * Copyright (C) 2020 Freie Universität Berlin
 *               2020 <NAME> <<EMAIL>>
 *               2013  INRIA.
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 *
 * @ingroup sys_auto_init
 * @{
 * @file
 * @brief   initializes any used module that has a trivial init function
 * @author  <NAME> <oliver.hahm@inria.fr>
 * @author  <NAME> <hauke.petersen@fu-berlin.de>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <m.lenders@fu-berlin.de>
 * @}
 */
#include <stdint.h>
#include <stdio.h>

#include "auto_init.h"
#include "kernel_defines.h"
#include "log.h"

void auto_init(void)
{
   if (IS_USED(MODULE_AUTO_INIT_ZTIMER)) {
        LOG_DEBUG("Auto init ztimer.\n");
        void ztimer_init(void);
        ztimer_init();
    }
    if (IS_USED(MODULE_AUTO_INIT_XTIMER) &&
            !IS_USED(MODULE_ZTIMER_XTIMER_COMPAT)) {
        LOG_DEBUG("Auto init xtimer.\n");
        extern void xtimer_init(void);
        xtimer_init();
    }
   if (IS_USED(MODULE_AUTO_INIT_RANDOM)) {
        LOG_DEBUG("Auto init random.\n");
        extern void auto_init_random(void);
        auto_init_random();
    }
    if (IS_USED(MODULE_SCHEDSTATISTICS)) {
        LOG_DEBUG("Auto init schedstatistics.\n");
        extern void init_schedstatistics(void);
        init_schedstatistics();
    }
    if (IS_USED(MODULE_DUMMY_THREAD)) {
        extern void dummy_thread_create(void);
        dummy_thread_create();
    }
    if (IS_USED(MODULE_EVENT_THREAD)) {
        LOG_DEBUG("Auto init event threads.\n");
        extern void auto_init_event_thread(void);
        auto_init_event_thread();
    }
    if (IS_USED(MODULE_SYS_BUS)) {
        LOG_DEBUG("Auto init system buses.\n");
        extern void auto_init_sys_bus(void);
        auto_init_sys_bus();
    }
    if (IS_USED(MODULE_MCI)) {
        LOG_DEBUG("Auto init mci.\n");
        extern void mci_initialize(void);
        mci_initialize();
    }
    if (IS_USED(MODULE_PROFILING)) {
        LOG_DEBUG("Auto init profiling.\n");
        extern void profiling_init(void);
{'fraction_non_alphanumeric': 0.12031425364758698, 'fraction_numerical': 0.006285072951739619, 'mean_word_length': 2.8647007805724196, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4521880', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1494, 'n_words': 329}