AWS IoT Device SDK C: Platform
Platform portability layer
Return to main page ↑
Platform Documentation

The platform layer provides portability across different operating systems.

All system calls (including networking) used in this SDK's libraries go through a lightweight platform layer. The functions of the platform layer are intended to be easily implementable on a wide variety of operating systems. The current platform layer has the following components:

  • Clock
    Time-related functions used by libraries in this SDK.
  • Thread Management
    Threading and synchronization functions used by libraries in this SDK.
  • Networking
    Abstraction of network functions used by libraries in this SDK.
  • Metrics
    Only used by Device Defender; does not need to be ported if not using Defender.
    Functions for retrieving Device Defender metrics.
  • Atomics
    Porting is optional, as a generic implementation is provided.
    Atomic operations: small inlined functions used for atomically manipulating memory.

The following implementations are provided with this SDK as porting samples:

Component Supported platforms
Clock POSIX
Thread Management POSIX
Networking mbed TLS
Berkeley sockets + OpenSSL + POSIX
Metrics Sample implementation using the Networking abstraction.
This implementation is not intended for production use.
Atomics GNU compilers (gcc/clang)
Generic implementation using a Thread Management mutex.