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.
ccharConstant char data type.
cintConstant int data type.
cucharUnsigned char data type.
cushortConstant unsigned short data type.
cvoidConstant void data type.
int16Integer 16 bits data type.
int32Integer 32 bits data type.
int8Integer 8 bits data type.
scharSigned char data type.
size_tUnsigned integral type.
ssizeSigned integer size field large enough to hold a pointer offset.
time_tUnsigned time type.
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:

Functions

Typedefs

typedef long size_t.

Unsigned integral type.

Equivalent in size to void*
typedef long time_t.

Unsigned time type.

Time in seconds since Jan 1, 1970
typedef char bool.

Boolean data type.

API Stability:
Stable.
typedef const char cchar.

Constant char data type.

API Stability:
Stable.
typedef const int cint.

Constant int data type.

API Stability:
Stable.
typedef const unsigned char cuchar.

Unsigned char data type.

API Stability:
Stable.
typedef const unsigned short cushort.

Constant unsigned short data type.

API Stability:
Stable.
typedef const void cvoid.

Constant void data type.

API Stability:
Stable.
typedef short int16.

Integer 16 bits data type.

API Stability:
Stable.
typedef int int32.

Integer 32 bits data type.

API Stability:
Stable.
typedef char int8.

Integer 8 bits data type.

API Stability:
Stable.
typedef int64 Offset.

Signed file offset data type.

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

Signed char data type.

API Stability:
Stable.
typedef int Socket.

Argument for sockets.

API Stability:
Stable.
typedef int Socklen.

Size to hold the length of a socket address.

API Stability:
Stable.
typedef ssize_t ssize.

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

API Stability:
Stable.
typedef int64 Ticks.

Elapsed time data type.

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

Time in milliseconds since Jan 1, 1970.

API Stability:
Stable.
typedef unsigned char uchar.

Unsigned char data type.

API Stability:
Stable.
typedef unsigned int uint.

Unsigned integer (machine dependent bit size) data type.

API Stability:
Stable.
typedef unsigned short uint16.

Unsigned integer 16 bits data type.

API Stability:
Stable.
typedef unsigned int uint32.

Unsigned integer 32 bits data type.

API Stability:
Stable.
typedef unsigned char uint8.

Unsigned integer 8 bits data type.

API Stability:
Stable.
typedef unsigned long ulong.

Unsigned long (machine dependent bit size) data type.

API Stability:
Stable.
typedef unsigned short ushort.

Unsigned short data type.

API Stability:
Stable.
typedef ssize wsize.

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

API Stability:
Stable.

© Embedthis Software. All rights reserved.