mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
5ed7cd6e32
These changes are compatible with clang-format 16 and will be mandatory when we eventually bump clang-format version. So, since there are no real downsides, let's commit them now.
30 lines
513 B
C++
30 lines
513 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
#ifdef KERNEL
|
|
# include <Kernel/UnixTypes.h>
|
|
#else
|
|
# include <time.h>
|
|
#endif
|
|
|
|
namespace Kernel {
|
|
|
|
inline bool time_page_supports(clockid_t clock_id)
|
|
{
|
|
return clock_id == CLOCK_REALTIME_COARSE || clock_id == CLOCK_MONOTONIC_COARSE;
|
|
}
|
|
|
|
struct TimePage {
|
|
u32 volatile update1;
|
|
struct timespec clocks[CLOCK_ID_COUNT];
|
|
u32 volatile update2;
|
|
};
|
|
|
|
}
|