Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/include/linux/unaligned/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  packed_struct.h   Sprache: C

 
#ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H
#define _LINUX_UNALIGNED_PACKED_STRUCT_H

#include <linux/types.h>

struct __una_u16 { u16 x; } __packed;
struct __una_u32 { u32 x; } __packed;
struct __una_u64 { u64 x; } __packed;

static inline u16 __get_unaligned_cpu16(const void *p)
{
 const struct __una_u16 *ptr = (const struct __una_u16 *)p;
 return ptr->x;
}

static inline u32 __get_unaligned_cpu32(const void *p)
{
 const struct __una_u32 *ptr = (const struct __una_u32 *)p;
 return ptr->x;
}

static inline u64 __get_unaligned_cpu64(const void *p)
{
 const struct __una_u64 *ptr = (const struct __una_u64 *)p;
 return ptr->x;
}

static inline void __put_unaligned_cpu16(u16 val, void *p)
{
 struct __una_u16 *ptr = (struct __una_u16 *)p;
 ptr->x = val;
}

static inline void __put_unaligned_cpu32(u32 val, void *p)
{
 struct __una_u32 *ptr = (struct __una_u32 *)p;
 ptr->x = val;
}

static inline void __put_unaligned_cpu64(u64 val, void *p)
{
 struct __una_u64 *ptr = (struct __una_u64 *)p;
 ptr->x = val;
}

#endif /* _LINUX_UNALIGNED_PACKED_STRUCT_H */

100%


¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.