mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 12:49:00 +00:00
NuttX provides the wdog module to implement timers for the scheduler. While it is lightweight and efficient, wdog only supports tick-level timers, typically in milliseconds. Although the tick duration can be configured, setting it to microsecond or nanosecond resolution is not practical. Doing so may cause an interrupt storm, where the CPU is constantly occupied handling tick interrupts. To address this limitation, a new hrtimer module is introduced. It coexists with the wdog module, providing both tick-level timers for wdog and high-resolution timers (nanosecond-level) directly to users. Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
############################################################################
|
|
# sched/hrtimer/Make.defs
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership. The
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance with the
|
|
# License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
############################################################################
|
|
|
|
# Add hrtimer-related files to the build
|
|
|
|
ifeq ($(CONFIG_HRTIMER),y)
|
|
CSRCS += hrtimer_cancel.c hrtimer_initialize.c hrtimer_process.c hrtimer_start.c
|
|
endif
|
|
|
|
# Include hrtimer build support
|
|
|
|
DEPPATH += --dep-path hrtimer
|
|
VPATH += :hrtimer
|