The file contains porting layer for threads.
More...
#include <stdint.h>
#include "iotcs_config.h"
Go to the source code of this file.
Detailed Description
The file contains porting layer for threads.
Function Documentation
int iotcs_port_sleep_millis |
( |
int32_t |
timeout_ms | ) |
|
Puts current thread into sleep for a given time.
- Note:
- Optional API. Called by the Library if IOTCS_MESSAGING_THREAD_SAFETY option is defined.
- Parameters:
-
timeout_ms | an interval in milliseconds |
void iotcs_port_thread_cleanup |
( |
void |
| ) |
|
Releases memory that was allocated automatically for new threads Called in thread context before thread finish execution.
This could be used to release automatically allocated thread local resources, like openSSL does. In most cases this method could be NO-OP.
- Note:
- Optional API. Called by the Library if IOTCS_MESSAGING_THREAD_SAFETY option is defined.
Creates and starts iotcs_port_thread instance.
- Note:
- Optional API. Called by the Library if IOTCS_MESSAGING_THREAD_SAFETY option is defined.
- Parameters:
-
- Returns:
- iotcs_port_thread on success
-
NULL if failed
Creates and starts iotcs_port_thread instance small stack size.
- Note:
- Optional API. Called by the Library if IOTCS_MESSAGING_THREAD_SAFETY option is defined.
- Parameters:
-
- Returns:
- iotcs_port_thread on success
-
NULL if failed
Joins iotcs_port_thread instance If a thread is NULL, no operation is performed.
- Note:
- Optional API. Called by the Library if IOTCS_MESSAGING_THREAD_SAFETY option is defined.
- Parameters:
-