__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __VDSO_HELPERS_H
#define __VDSO_HELPERS_H
#ifndef __ASSEMBLY__
#include <asm/barrier.h>
#include <vdso/datapage.h>
static __always_inline u32 vdso_read_begin(const struct vdso_data *vd)
{
u32 seq;
while (unlikely((seq = READ_ONCE(vd->seq)) & 1))
cpu_relax();
smp_rmb();
return seq;
}
static __always_inline u32 vdso_read_retry(const struct vdso_data *vd,
u32 start)
{
u32 seq;
smp_rmb();
seq = READ_ONCE(vd->seq);
return seq != start;
}
static __always_inline void vdso_write_begin(struct vdso_data *vd)
{
/*
* WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
* reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
smp_wmb();
}
static __always_inline void vdso_write_end(struct vdso_data *vd)
{
smp_wmb();
/*
* WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
* reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
}
#endif /* !__ASSEMBLY__ */
#endif /* __VDSO_HELPERS_H */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| bits.h | File | 209 B | 0644 |
|
| clocksource.h | File | 479 B | 0644 |
|
| const.h | File | 196 B | 0644 |
|
| datapage.h | File | 4.97 KB | 0644 |
|
| getrandom.h | File | 2.41 KB | 0644 |
|
| gettime.h | File | 755 B | 0644 |
|
| helpers.h | File | 1.29 KB | 0644 |
|
| jiffies.h | File | 298 B | 0644 |
|
| ktime.h | File | 454 B | 0644 |
|
| limits.h | File | 564 B | 0644 |
|
| math64.h | File | 1.29 KB | 0644 |
|
| page.h | File | 814 B | 0644 |
|
| processor.h | File | 251 B | 0644 |
|
| time.h | File | 190 B | 0644 |
|
| time32.h | File | 274 B | 0644 |
|
| time64.h | File | 426 B | 0644 |
|
| unaligned.h | File | 427 B | 0644 |
|
| vsyscall.h | File | 288 B | 0644 |
|