123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
#ifndef _LINUX_FUTEX_TYPES_H
#define _LINUX_FUTEX_TYPES_H
#ifdef CONFIG_FUTEX
#include <linux/compiler_types.h>
#include <linux/mutex_types.h>
#include <linux/types.h>
struct compat_robust_list_head;
struct futex_pi_state;
struct robust_list_head;
struct futex_sched_data {
struct robust_list_head __user *robust_list;
#ifdef CONFIG_COMPAT
struct compat_robust_list_head __user *compat_robust_list;
#endif
struct list_head pi_state_list;
struct futex_pi_state *pi_state_cache;
struct mutex exit_mutex;
unsigned int state;
};
#ifdef CONFIG_FUTEX_PRIVATE_HASH
struct futex_mm_phash {
struct mutex lock;
struct futex_private_hash __rcu *hash;
struct futex_private_hash *hash_new;
unsigned long batches;
struct rcu_head rcu;
atomic_long_t atomic;
unsigned int __percpu *ref;
};
#else /* CONFIG_FUTEX_ROBUST_UNLOCK */
struct futex_mm_phash { };
#endif /* !CONFIG_FUTEX_ROBUST_UNLOCK */
#ifdef CONFIG_FUTEX_ROBUST_UNLOCK
struct futex_unlock_cs_range {
unsigned long start_ip;
unsigned int len;
unsigned int pop_size32;
};
#define FUTEX_ROBUST_MAX_CS_RANGES (1 + IS_ENABLED(CONFIG_COMPAT))
struct futex_unlock_cs_ranges {
struct futex_unlock_cs_range cs_ranges[FUTEX_ROBUST_MAX_CS_RANGES];
};
#else /* CONFIG_FUTEX_ROBUST_UNLOCK */
struct futex_unlock_cs_ranges { };
#endif /* !CONFIG_FUTEX_ROBUST_UNLOCK */
struct futex_mm_data {
struct futex_mm_phash phash;
struct futex_unlock_cs_ranges unlock;
atomic64_t unique_id;
};
#else /* CONFIG_FUTEX */
struct futex_sched_data { };
struct futex_mm_data { };
#endif /* !CONFIG_FUTEX */
#endif /* _LINUX_FUTEX_TYPES_H */