<commit_before>/*
 * Copyright (c) 2015 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Initialize system clock driver
 *
 * Initializing the timer driver is done in this module to reduce code
 * duplication.
 */

#include <kernel.h>
#include <init.h>
#include <drivers/system_timer.h>

SYS_DEVICE_DEFINE("sys_clock", z_clock_driver_init, z_clock_device_ctrl,
		PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);

/* Weak-linked noop defaults for optional driver interfaces: */

int __weak z_clock_driver_init(struct device *device)
{
	return 0;
}

int __weak z_clock_device_ctrl(struct device *device,
				 u32_t ctrl_command, void *context)
{
	return 0;
}

void __weak z_clock_set_timeout(s32_t ticks, bool idle)
{
}<commit_msg>drivers: timer: use weak functions after declaration<commit_after>/*
 * Copyright (c) 2015 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Initialize system clock driver
 *
 * Initializing the timer driver is done in this module to reduce code
 * duplication.
 */

#include <kernel.h>
#include <init.h>
#include <drivers/system_timer.h>

/* Weak-linked noop defaults for optional driver interfaces: */

int __weak z_clock_driver_init(struct device *device)
{
	return 0;
}

int __weak z_clock_device_ctrl(struct device *device,
				 u32_t ctrl_command, void *context)
{
	return 0;
}

void __weak z_clock_set_timeout(s32_t ticks, bool idle)
{
}

SYS_DEVICE_DEFINE("sys_clock", z_clock_driver_init, z_clock_device_ctrl,
		PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
{'fraction_non_alphanumeric': 0.10182275298554368, 'fraction_numerical': 0.016341923318667503, 'mean_word_length': 4.874538745387454, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7196000', 'n_tokens_mistral': 579, 'n_tokens_neox': 536, 'n_words': 148}