KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Types

Standard types and their utilities More...

Files

file  string.h
 Variants on standard block memory copy/set functions.
 
file  types.h
 Common integer types.
 

Typedefs

typedef unsigned long long uint64
 64-bit unsigned integer
 
typedef unsigned long uint32
 32-bit unsigned integer
 
typedef unsigned short uint16
 16-bit unsigned integer
 
typedef unsigned char uint8
 8-bit unsigned integer
 
typedef long long int64
 64-bit signed integer
 
typedef long int32
 32-bit signed integer
 
typedef short int16
 16-bit signed integer
 
typedef char int8
 8-bit signed integer
 
typedef volatile uint64 vuint64
 64-bit volatile unsigned type
 
typedef volatile uint32 vuint32
 32-bit volatile unsigned type
 
typedef volatile uint16 vuint16
 16-bit volatile unsigned type
 
typedef volatile uint8 vuint8
 8-bit volatile unsigned type
 
typedef volatile int64 vint64
 64-bit volatile signed type
 
typedef volatile int32 vint32
 32-bit volatile signed type
 
typedef volatile int16 vint16
 16-bit volatile signed type
 
typedef volatile int8 vint8
 8-bit volatile signed type
 

Functions

void * memcpy4 (void *dest, const void *src, size_t count)
 Copy a block of memory, 4 bytes at a time.
 
void * memset4 (void *s, unsigned long c, size_t count)
 Set a block of memory, 4 bytes at a time.
 
void * memcpy2 (void *dest, const void *src, size_t count)
 Copy a block of memory, 2 bytes at a time.
 
void * memset2 (void *s, unsigned short c, size_t count)
 Set a block of memory, 2 bytes at a time.
 

Detailed Description

Standard types and their utilities

Typedef Documentation

◆ int16

typedef short int16

16-bit signed integer

◆ int32

typedef long int32

32-bit signed integer

◆ int64

typedef long long int64

64-bit signed integer

◆ int8

typedef char int8

8-bit signed integer

◆ uint16

typedef unsigned short uint16

16-bit unsigned integer

◆ uint32

typedef unsigned long uint32

32-bit unsigned integer

◆ uint64

typedef unsigned long long uint64

64-bit unsigned integer

◆ uint8

typedef unsigned char uint8

8-bit unsigned integer

◆ vint16

typedef volatile int16 vint16

16-bit volatile signed type

◆ vint32

typedef volatile int32 vint32

32-bit volatile signed type

◆ vint64

typedef volatile int64 vint64

64-bit volatile signed type

◆ vint8

typedef volatile int8 vint8

8-bit volatile signed type

◆ vuint16

typedef volatile uint16 vuint16

16-bit volatile unsigned type

◆ vuint32

typedef volatile uint32 vuint32

32-bit volatile unsigned type

◆ vuint64

typedef volatile uint64 vuint64

64-bit volatile unsigned type

◆ vuint8

typedef volatile uint8 vuint8

8-bit volatile unsigned type

Function Documentation

◆ memcpy2()

void * memcpy2 ( void * dest,
const void * src,
size_t count )

Copy a block of memory, 2 bytes at a time.

Deprecated
Invokes undefined behavior. Use memcpy().

This function is identical to memcpy(), except it copies 2 bytes at a time.

Warning
This function breaks C/C++ strict aliasing rules and is no longer considered safe to use. It's also slow.
Parameters
destThe destination of the copy.
srcThe source to copy.
countThe number of bytes to copy. This should be divisible by 2 (and will be rounded down if not).
Returns
The original value of dest.

◆ memcpy4()

void * memcpy4 ( void * dest,
const void * src,
size_t count )

Copy a block of memory, 4 bytes at a time.

Deprecated
Invokes undefined behavior. Use memcpy().

This function is identical to memcpy(), except it copies 4 bytes at a time.

Warning
This function breaks C/C++ strict aliasing rules and is no longer considered safe to use. It's also slow.
Parameters
destThe destination of the copy.
srcThe source to copy.
countThe number of bytes to copy. This should be divisible by 4 (and will be rounded down if not).
Returns
The original value of dest.

◆ memset2()

void * memset2 ( void * s,
unsigned short c,
size_t count )

Set a block of memory, 2 bytes at a time.

Deprecated
Invokes undefined behavior.

This function is identical to memset(), except it sets 2 bytes at a time. This implies that all 16-bits of c are used, not just the first 8 as in memset().

Warning
This function breaks C/C++ strict aliasing rules and is no longer considered safe to use.
Parameters
sThe destination of the set.
cThe value to set to.
countThe number of bytes to set. This should be divisible by 2 (and will be rounded down if not).
Returns
The original value of dest.

◆ memset4()

void * memset4 ( void * s,
unsigned long c,
size_t count )

Set a block of memory, 4 bytes at a time.

Deprecated
Invokes undefined behavior. Use memset().

This function is identical to memset(), except it sets 4 bytes at a time. This implies that all 32-bits of c are used, not just the first 8 as in memset().

Warning
This function breaks C/C++ strict aliasing rules and is no longer considered safe to use.
Parameters
sThe destination of the set.
cThe value to set to.
countThe number of bytes to set. This should be divisible by 4 (and will be rounded down if not).
Returns
The original value of dest.