Files
geramyloveless 965c4af2be linuxu: library services the display code links against
- get_random_bytes()/get_random_u*() from the platform CSPRNG
  (arc4random_buf(), which DriverKit's libSystem also provides); DP MST
  uses it for sideband nonces.
- lib/uuid.c built unmodified as a helper (guid_gen(), guid_null for DP
  MST branch GUIDs), with hex_to_bin()/hex2bin()/bin2hex() from
  lib/hexdump.c and the upstream linux/hex.h.
- kstrtobool() and kstrtobool_from_user() from lib/kstrtox.c for the
  DC debugfs write handlers.
- vzalloc() for the DML/DML2 work areas.
- Upstream headers and helpers: linux/bitfield.h and linux/typecheck.h
  verbatim (kernel.h now uses the upstream typecheck()), the full
  linux/backlight.h and drm_privacy_screen_consumer.h (their
  !CONFIG inlines replace stray declarations), ffz(), might_sleep_if(),
  delayed_work_pending(), ARCH_KMALLOC_MINALIGN, linux/minmax.h, and
  linux/err.h from linux/dmi.h as the quirk tables need. ssleep() is the
  upstream inline now.
2026-10-02 20:56:28 -07:00

66 lines
2.7 KiB
C

/* linuxu: SHIM (third_party/linux/include/linux/preempt.h) — no-op preemption */
#ifndef _LINUX_PREEMPT_H
#define _LINUX_PREEMPT_H
#include <linux/types.h>
#define preempt_disable() do { } while (0)
#define preempt_enable() do { } while (0)
#define preempt_enable_no_resched() preempt_enable()
#define preempt_enable_resched() preempt_enable()
#define preempt_disable_noraise() preempt_disable()
#define preempt_enable_noresched() preempt_enable()
#define preempt_enable_resched_notrace() preempt_enable()
#define preempt_disable_notrace() preempt_disable()
#define preempt_enable_notrace() preempt_enable()
#define preempt_enable_no_resched_notrace() preempt_enable()
#define preempt_enable_sched() preempt_enable()
#define preempt_disable_sched() preempt_disable()
#define preempt_enable_delay()
#define preempt_disable_delay()
#define preempt_enable_irq()
#define preempt_disable_irq()
#define preempt_count() 0
#define preempt_count_add(x) do { } while (0)
#define preempt_count_sub(x) do { } while (0)
#define preempt_count_inc() do { } while (0)
#define preempt_count_dec() do { } while (0)
#define might_sleep() do { } while (0)
#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
#define might_resched() do { } while (0)
#define might_resched_rcu() do { } while (0)
#define cond_resched() false
#define cond_resched_rcu() false
#define cond_resched_lock() false
#define cond_resched_lock_irq() false
#define cond_resched_softirq() false
#define cond_resched_blocked() false
#define cond_resched_blocked_lock() false
#define cond_resched_maybe() false
#define cond_resched_maybe_lock() false
#define cond_resched_maybe_lock_irq() false
#define cond_resched_maybe_lock_irqsave() false
#define cond_resched_maybe_softirq() false
#define cond_resched_maybe_softirq_noblock() false
#define cond_resched_maybe_softirq_lock() false
#define cond_resched_maybe_softirq_lock_irq() false
#define cond_resched_maybe_softirq_lock_irqsave() false
#define cond_resched_maybe_softirq_noblock_lock() false
#define cond_resched_maybe_softirq_noblock_lock_irq() false
#define cond_resched_maybe_softirq_noblock_lock_irqsave() false
#define cond_resched_maybe_softirq_noblock_irqsave() false
#define cond_resched_maybe_softirq_lock_noblock() false
#define cond_resched_maybe_softirq_lock_noblock_irq() false
#define cond_resched_maybe_softirq_lock_noblock_irqsave() false
#define preempt_lazy_disable() do { } while (0)
#define preempt_lazy_enable() do { } while (0)
#define preempt_lazy_count() 0
#define preempt_lazy_count_add(x) do { } while (0)
#define preempt_lazy_count_sub(x) do { } while (0)
#define preempt_lazy_count_inc() do { } while (0)
#define preempt_lazy_count_dec() do { } while (0)
#endif /* _LINUX_PREEMPT_H */