404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.15.229.14: ~ $
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_UNALIGNED_MEMMOVE_H
#define _LINUX_UNALIGNED_MEMMOVE_H

#include <linux/kernel.h>
#include <linux/string.h>

/* Use memmove here, so gcc does not insert a __builtin_memcpy. */

static inline u16 __get_unaligned_memmove16(const void *p)
{
	u16 tmp;
	memmove(&tmp, p, 2);
	return tmp;
}

static inline u32 __get_unaligned_memmove32(const void *p)
{
	u32 tmp;
	memmove(&tmp, p, 4);
	return tmp;
}

static inline u64 __get_unaligned_memmove64(const void *p)
{
	u64 tmp;
	memmove(&tmp, p, 8);
	return tmp;
}

static inline void __put_unaligned_memmove16(u16 val, void *p)
{
	memmove(p, &val, 2);
}

static inline void __put_unaligned_memmove32(u32 val, void *p)
{
	memmove(p, &val, 4);
}

static inline void __put_unaligned_memmove64(u64 val, void *p)
{
	memmove(p, &val, 8);
}

#endif /* _LINUX_UNALIGNED_MEMMOVE_H */

Filemanager

Name Type Size Permission Actions
access_ok.h File 1.42 KB 0644
be_byteshift.h File 1.43 KB 0644
be_memmove.h File 809 B 0644
be_struct.h File 788 B 0644
generic.h File 2.12 KB 0644
le_byteshift.h File 1.43 KB 0644
le_memmove.h File 809 B 0644
le_struct.h File 788 B 0644
memmove.h File 868 B 0644
packed_struct.h File 1.04 KB 0644