Files
nvdriver/tests/software-manager/fixture.h
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

25 lines
962 B
C

#ifndef SOFTWARE_MANAGER_FIXTURE_H
#define SOFTWARE_MANAGER_FIXTURE_H
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
struct task_struct { unsigned unused; };
extern _Thread_local struct task_struct fixture_task;
extern _Thread_local bool fixture_process;
extern unsigned fixture_warnings;
#define current (&fixture_task)
#define DEFINE_MUTEX(name) pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER
#define READ_ONCE(x) __atomic_load_n(&(x),__ATOMIC_ACQUIRE)
#define WRITE_ONCE(x,v) __atomic_store_n(&(x),(v),__ATOMIC_RELEASE)
#define in_interrupt() (!fixture_process)
#define irqs_disabled() false
#define in_atomic() false
#define WARN_ON(x) ((x) ? (++fixture_warnings, true) : false)
static inline void mutex_lock(pthread_mutex_t *m) { assert(!pthread_mutex_lock(m)); }
static inline void mutex_unlock(pthread_mutex_t *m) { assert(!pthread_mutex_unlock(m)); }
#endif