mqtt: use sys_mutex instead of k_mutex

Allows the mqtt_client data structure to exist in user memory.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-03-27 15:55:46 -07:00 committed by Anas Nashif
commit 7e3a34f84f
2 changed files with 12 additions and 4 deletions

View file

@ -27,6 +27,7 @@
#include <zephyr.h>
#include <zephyr/types.h>
#include <net/tls_credentials.h>
#include <misc/mutex.h>
#ifdef __cplusplus
extern "C" {
@ -404,7 +405,7 @@ struct mqtt_transport {
/** @brief MQTT internal state. */
struct mqtt_internal {
/** Internal. Mutex to protect access to the client instance. */
struct k_mutex mutex;
struct sys_mutex mutex;
/** Internal. Wall clock value (in milliseconds) of the last activity
* that occurred. Needed for periodic PING.