AWS IoT Embedded C Device SDK
threads_interface.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 
24 #include "aws_iot_config.h"
25 #ifdef _ENABLE_THREAD_SUPPORT_
26 #ifndef __THREADS_INTERFACE_H_
27 #define __THREADS_INTERFACE_H_
28 
32 #include "threads_platform.h"
33 
34 #include <aws_iot_error.h>
35 
44 typedef struct _IoT_Mutex_t IoT_Mutex_t;
45 
54 IoT_Error_t aws_iot_thread_mutex_init(IoT_Mutex_t *);
55 
65 IoT_Error_t aws_iot_thread_mutex_lock(IoT_Mutex_t *);
66 
76 IoT_Error_t aws_iot_thread_mutex_trylock(IoT_Mutex_t *);
77 
86 IoT_Error_t aws_iot_thread_mutex_unlock(IoT_Mutex_t *);
87 
96 IoT_Error_t aws_iot_thread_mutex_destroy(IoT_Mutex_t *);
97 
98 #endif /*__THREADS_INTERFACE_H_*/
99 #endif /*_ENABLE_THREAD_SUPPORT_*/
Definition of error types for the SDK.
IoT_Error_t
IoT Error enum.
Definition: aws_iot_error.h:36