linux/rust/helpers/helpers.c
Miguel Ojeda 77580e801a rust-timekeeping for v6.17
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEEsH5R1a/fCoV1sAS4bgaPnkoY3cFAmhrd38WHGEuaGluZGJv
 cmdAa2VybmVsLm9yZwAKCRDhuBo+eShjd0CsD/9qKvg1sVajmgcuksUbxakjDOK+
 xg5ySpv/a+aIkoR9sWAcNCZY0VUZPkO3+l5otTV3f6ehovPJkuvm9eBD6NepwAf+
 +lBO6TSaEGzwyGS/m8LT1vjcx5FAjEX/rT1bI5jjROUgfEnyMYtL11e/X3N0Heja
 Gc2VQhUabEgS1Vvf9XGKDTbBZJYyL4ZPZGRiUz2ZGwReL0RD9swbzUaoXLFLqH8w
 g4vHa+nVdMJGaTD5tAc6Em9hAWf8BkVbUNRzjqNP4sF3H3BB1CZg42MiR4Xa0teN
 SVAEqza7eBSHeUfmWFodkj5H5lGTOQjDK/OzVEfp0HyZT929CcG+4chieWPvc7aT
 KlBF4SxtXGHyyEfctmxuAEJwbdPobQQyGjCdEW3L0SWVpGRo/j6SesAyB3ldNsig
 JKKeqw9BGmJQaEgjUH81iPmP9uvo/qrzPBewNE1abS17DPowEcEeWmn7NhXLx5hq
 Y6HsrcPoeotvW71ZiwrACmZaFG4V2LxJLEiUyn9Rl896BMZJCShQbBciZzI6nfLF
 EAGEV1t4sCW158LDAMjCxZdLMcXzj0fBMTyLobMPK6KFwXjDaOlxjK+tT6eV9W1O
 7lLkYYeZRWFjijnpwn1tE4x56je29sAezJWDCIZb5g6OUh/HgjEMukTLI64W+fY1
 0uOhZ4lTtwo1j6b/1Q==
 =iwdh
 -----END PGP SIGNATURE-----

Merge tag 'rust-timekeeping-for-v6.17' of https://github.com/Rust-for-Linux/linux into rust-next

Pull timekeeping updates from Andreas Hindborg:

 - Make 'Instant' generic over clock source. This allows the compiler to
   assert that arithmetic expressions involving the 'Instant' use
   'Instants' based on the same clock source.

 - Make 'HrTimer' generic over the timer mode. 'HrTimer' timers take a
   'Duration' or an 'Instant' when setting the expiry time, depending on
   the timer mode. With this change, the compiler can check the type
   matches the timer mode.

 - Add an abstraction for 'fsleep'. 'fsleep' is a flexible sleep
   function that will select an appropriate sleep method depending on
   the requested sleep time.

 - Avoid 64-bit divisions on 32-bit hardware when calculating
   timestamps.

 - Seal the 'HrTimerMode' trait. This prevents users of the
   'HrTimerMode' from implementing the trait on their own types.

* tag 'rust-timekeeping-for-v6.17' of https://github.com/Rust-for-Linux/linux:
  rust: time: Add wrapper for fsleep() function
  rust: time: Seal the HrTimerMode trait
  rust: time: Remove Ktime in hrtimer
  rust: time: Make HasHrTimer generic over HrTimerMode
  rust: time: Add HrTimerExpires trait
  rust: time: Replace HrTimerMode enum with trait-based mode types
  rust: time: Add ktime_get() to ClockSource trait
  rust: time: Make Instant generic over ClockSource
  rust: time: Replace ClockId enum with ClockSource trait
  rust: time: Avoid 64-bit integer division on 32-bit architectures
2025-07-16 23:45:08 +02:00

49 lines
1 KiB
C

// SPDX-License-Identifier: GPL-2.0
/*
* Non-trivial C macros cannot be used in Rust. Similarly, inlined C functions
* cannot be called either. This file explicitly creates functions ("helpers")
* that wrap those so that they can be called from Rust.
*
* Sorted alphabetically.
*/
#include "auxiliary.c"
#include "blk.c"
#include "bug.c"
#include "build_assert.c"
#include "build_bug.c"
#include "clk.c"
#include "completion.c"
#include "cpu.c"
#include "cpufreq.c"
#include "cpumask.c"
#include "cred.c"
#include "device.c"
#include "dma.c"
#include "drm.c"
#include "err.c"
#include "fs.c"
#include "io.c"
#include "jump_label.c"
#include "kunit.c"
#include "mm.c"
#include "mutex.c"
#include "page.c"
#include "pci.c"
#include "pid_namespace.c"
#include "platform.c"
#include "rbtree.c"
#include "rcu.c"
#include "refcount.c"
#include "security.c"
#include "signal.c"
#include "slab.c"
#include "spinlock.c"
#include "sync.c"
#include "task.c"
#include "time.c"
#include "uaccess.c"
#include "vmalloc.c"
#include "wait.c"
#include "workqueue.c"
#include "xarray.c"