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
 Internal typedefs.
 
file  types.h
 Common integer types.
 

Data Structures

struct  _mbstate_t
 Conversion state information. More...
 

Macros

#define _TIME_T_   long
 
#define _CLOCKID_T_   unsigned long
 
#define _TIMER_T_   unsigned long
 
#define _CLOCK_T_   unsigned long /* clock() */
 
#define LITTLE_ENDIAN   1234
 Little Endian test macro.
 
#define BIG_ENDIAN   4321
 Big Endian test macro.
 
#define PDP_ENDIAN   3412
 PDP Endian test macro.
 
#define AT_EACCESS   1
 Check access using effective user and group ID.
 
#define AT_SYMLINK_NOFOLLOW   2
 Do not follow symlinks.
 
#define AT_SYMLINK_FOLLOW   4
 Follow symbolic links.
 
#define AT_REMOVEDIR   8
 Remove directory instead of file.
 
#define IOV_MAX   1024
 Maximum length of an iovec, in elements.
 
#define BYTE_ORDER   LITTLE_ENDIAN
 Endianness definition – Little Endian.
 

Typedefs

typedef long _off_t
 File offset type.
 
typedef _off_t __off_t
 
typedef short __dev_t
 Device ID type.
 
typedef unsigned short __uid_t
 User ID type.
 
typedef unsigned short __gid_t
 Group ID type.
 
typedef long long _off64_t
 64-bit file offset type.
 
typedef long _fpos_t
 File position type.
 
typedef long _ssize_t
 
typedef __newlib_recursive_lock_t _flock_t
 File lock type.
 
typedef void * _iconv_t
 Iconv descriptor type.
 
typedef long __blkcnt_t
 
typedef long __blksize_t
 
typedef long __daddr_t
 
typedef unsigned long long __fsblkcnt_t
 
typedef unsigned long __fsfilcnt_t
 
typedef unsigned long __id_t
 
typedef unsigned long __ino_t
 
typedef int __pid_t
 
typedef long __key_t
 
typedef unsigned long __mode_t
 
typedef unsigned short __nlink_t
 
typedef long __suseconds_t
 
typedef unsigned long __useconds_t
 
typedef _TIME_T_ __time_t
 
typedef _CLOCKID_T_ __clockid_t
 
typedef _TIMER_T_ __timer_t
 
typedef _CLOCK_T_ __clock_t
 
typedef char * __va_list
 
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
 
typedef uint32 ptr_t
 Pointer arithmetic type.
 
typedef int handle_t
 Generic "handle" type.
 
typedef handle_t tid_t
 Thread ID type.
 
typedef handle_t prio_t
 Priority value type.
 

Functions

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

Detailed Description

Standard types and their utilities

Macro Definition Documentation

◆ _CLOCK_T_

#define _CLOCK_T_   unsigned long /* clock() */

◆ _CLOCKID_T_

#define _CLOCKID_T_   unsigned long

◆ _TIME_T_

#define _TIME_T_   long

◆ _TIMER_T_

#define _TIMER_T_   unsigned long

◆ AT_EACCESS

#define AT_EACCESS   1

Check access using effective user and group ID.

◆ AT_REMOVEDIR

#define AT_REMOVEDIR   8

Remove directory instead of file.

◆ AT_SYMLINK_FOLLOW

#define AT_SYMLINK_FOLLOW   4

Follow symbolic links.

◆ AT_SYMLINK_NOFOLLOW

#define AT_SYMLINK_NOFOLLOW   2

Do not follow symlinks.

◆ BIG_ENDIAN

#define BIG_ENDIAN   4321

Big Endian test macro.

◆ BYTE_ORDER

#define BYTE_ORDER   LITTLE_ENDIAN

Endianness definition – Little Endian.

◆ IOV_MAX

#define IOV_MAX   1024

Maximum length of an iovec, in elements.

◆ LITTLE_ENDIAN

#define LITTLE_ENDIAN   1234

Little Endian test macro.

◆ PDP_ENDIAN

#define PDP_ENDIAN   3412

PDP Endian test macro.

Typedef Documentation

◆ __blkcnt_t

typedef long __blkcnt_t

◆ __blksize_t

typedef long __blksize_t

◆ __clock_t

◆ __clockid_t

◆ __daddr_t

typedef long __daddr_t

◆ __dev_t

typedef short __dev_t

Device ID type.

◆ __fsblkcnt_t

typedef unsigned long long __fsblkcnt_t

◆ __fsfilcnt_t

typedef unsigned long __fsfilcnt_t

◆ __gid_t

typedef unsigned short __gid_t

Group ID type.

◆ __id_t

typedef unsigned long __id_t

◆ __ino_t

typedef unsigned long __ino_t

◆ __key_t

typedef long __key_t

◆ __mode_t

typedef unsigned long __mode_t

◆ __nlink_t

typedef unsigned short __nlink_t

◆ __off_t

typedef _off_t __off_t

◆ __pid_t

typedef int __pid_t

◆ __suseconds_t

typedef long __suseconds_t

◆ __time_t

typedef _TIME_T_ __time_t

◆ __timer_t

◆ __uid_t

typedef unsigned short __uid_t

User ID type.

◆ __useconds_t

typedef unsigned long __useconds_t

◆ __va_list

typedef char* __va_list

◆ _flock_t

typedef __newlib_recursive_lock_t _flock_t

File lock type.

◆ _fpos_t

typedef long _fpos_t

File position type.

◆ _iconv_t

typedef void* _iconv_t

Iconv descriptor type.

◆ _off64_t

typedef long long _off64_t

64-bit file offset type.

◆ _off_t

typedef long _off_t

File offset type.

◆ _ssize_t

typedef long _ssize_t

◆ handle_t

typedef int handle_t

Generic "handle" type.

◆ 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

◆ prio_t

typedef handle_t prio_t

Priority value type.

◆ ptr_t

typedef uint32 ptr_t

Pointer arithmetic type.

◆ tid_t

typedef handle_t tid_t

Thread ID type.

◆ 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.