OSDEP API

Extensions

Osdep Operating system dependent layer that provides a portable cross-platform abstraction layer.

Functions

Typedefs

OffsetSigned file offset data type.
SocketArgument for sockets.
SocklenSize to hold the length of a socket address.
TicksElapsed time data type.
TimeTime in milliseconds since Jan 1, 1970.
boolBoolean data type.
int16Integer 16 bits data type.
int32Integer 32 bits data type.
int8Integer 8 bits data type.
scharSigned char data type.
ssizeSigned integer size field large enough to hold a pointer offset.
ucharUnsigned char data type.
uintUnsigned integer (machine dependent bit size) data type.
uint16Unsigned integer 16 bits data type.
uint32Unsigned integer 32 bits data type.
uint8Unsigned integer 8 bits data type.
ulongUnsigned long (machine dependent bit size) data type.
ushortUnsigned short data type.
wsizeWindows uses uint for write/read counts (Ugh!).

Defines

#defineME_BIG_ENDIAN   2
 Big endian byte ordering.
#defineME_BUFSIZE   4096
 Reasonable size for buffers.
#defineME_CPU_ARM   1
 Arm.
#defineME_CPU_ITANIUM   2
 Intel Itanium.
#defineME_CPU_MIPS   5
 Mips.
#defineME_CPU_PPC   6
 Power PC.
#defineME_CPU_SH   9
 SuperH.
#defineME_CPU_SPARC   7
 Sparc.
#defineME_CPU_TIDSP   8
 TI DSP.
#defineME_CPU_X64   4
 AMD64 or EMT64.
#defineME_CPU_X86   3
 X86.
#defineME_DEBUG   0
 Default to a debug build.
#defineME_LITTLE_ENDIAN   1
 Little endian byte ordering.
#defineME_MAX_ARGC   32
 Maximum number of command line args if using MAIN().
#defineME_MAX_FNAME   256
 Reasonable filename size.
#defineME_MAX_PATH   1024
 Reasonable filename size.
#defineME_STACK_SIZE   (128 * 1024)
 Default thread stack size (0 means use system default).
#defineTPS   1000
 Time/Ticks units per second (milliseconds).
#defineTPS   1000
 Time/Ticks units per second (milliseconds).

Osdep

Osdep

Operating system dependent layer that provides a portable cross-platform abstraction layer.

API Stability:
Evolving.
Fields:
const typedef charconst typedef char cchar Constant char data type. API Stability:Stable
const typedef intconst typedef int cint Constant int data type. API Stability:Stable
const typedef unsigned charconst typedef unsigned char cuchar Unsigned char data type. API Stability:Stable
const typedef unsigned shortconst typedef unsigned short cushort Constant unsigned short data type. API Stability:Stable
const typedef voidconst typedef void cvoid Constant void data type. API Stability:Stable

Functions

Typedefs

typedef char bool.

Boolean data type.

API Stability:
Stable.
See Also:
typedef short int16.

Integer 16 bits data type.

API Stability:
Stable.
See Also:
typedef int int32.

Integer 32 bits data type.

API Stability:
Stable.
See Also:
typedef char int8.

Integer 8 bits data type.

API Stability:
Stable.
See Also:
typedef int64 Offset.

Signed file offset data type.

Supports large files greater than 4GB in size on all systems
API Stability:
Stable.
See Also:
typedef signed char schar.

Signed char data type.

API Stability:
Stable.
See Also:
typedef int Socket.

Argument for sockets.

API Stability:
Stable.
See Also:
typedef int Socklen.

Size to hold the length of a socket address.

API Stability:
Stable.
See Also:
typedef ssize_t ssize.

Signed integer size field large enough to hold a pointer offset.

API Stability:
Stable.
See Also:
typedef int64 Ticks.

Elapsed time data type.

Stores time in milliseconds from some arbitrary start epoch
API Stability:
Stable.
See Also:
typedef int64 Time.

Time in milliseconds since Jan 1, 1970.

API Stability:
Stable.
See Also:
typedef unsigned char uchar.

Unsigned char data type.

API Stability:
Stable.
See Also:
typedef unsigned int uint.

Unsigned integer (machine dependent bit size) data type.

API Stability:
Stable.
See Also:
typedef unsigned short uint16.

Unsigned integer 16 bits data type.

API Stability:
Stable.
See Also:
typedef unsigned int uint32.

Unsigned integer 32 bits data type.

API Stability:
Stable.
See Also:
typedef unsigned char uint8.

Unsigned integer 8 bits data type.

API Stability:
Stable.
See Also:
typedef unsigned long ulong.

Unsigned long (machine dependent bit size) data type.

API Stability:
Stable.
See Also:
typedef unsigned short ushort.

Unsigned short data type.

API Stability:
Stable.
See Also:
typedef ssize wsize.

Windows uses uint for write/read counts (Ugh!).

API Stability:
Stable.
See Also:

© Embedthis Software. All rights reserved.