TuyaOS
结构体 | 函数
tuya_smartpointer.h 文件参考

tuya reference data module 更多...

#include "tuya_cloud_types.h"
#include "tkl_mutex.h"
tuya_smartpointer.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  SMARTPOINTER_T
 the reference data 更多...
 

函数

SMARTPOINTER_Ttuya_smartpointer_create (void *data, const UINT_T data_len, const BOOL_T malk, const UINT_T cnt)
 create a reference data 更多...
 
void tuya_smartpointer_del (SMARTPOINTER_T *sp_data)
 delete the reference data, ignore the reference 更多...
 
void tuya_smartpointer_get (SMARTPOINTER_T *sp_data)
 get the reference data, increase the reference 更多...
 
void tuya_smartpointer_put (SMARTPOINTER_T *sp_data)
 put the reference data, decrease the reference 更多...
 

详细描述

tuya reference data module

版本
1.0
日期
2019-10-30

函数说明

◆ tuya_smartpointer_create()

SMARTPOINTER_T * tuya_smartpointer_create ( void *  data,
const UINT_T  data_len,
const BOOL_T  malk,
const UINT_T  cnt 
)

create a reference data

参数
[in]datathe data buffer
[in]data_lenthe date length
[in]malkneed malloc memory for the data
[in]cntthe Initial value of the reference
返回
the reference data address

◆ tuya_smartpointer_del()

void tuya_smartpointer_del ( SMARTPOINTER_T sp_data)

delete the reference data, ignore the reference

参数
[in,out]sp_datathe reference data
返回
VOID

◆ tuya_smartpointer_get()

void tuya_smartpointer_get ( SMARTPOINTER_T sp_data)

get the reference data, increase the reference

参数
[in,out]sp_datathe reference data
返回
VOID

◆ tuya_smartpointer_put()

void tuya_smartpointer_put ( SMARTPOINTER_T sp_data)

put the reference data, decrease the reference

参数
[in,out]sp_datathe reference data
返回
VOID
注解
the reference data will be released when reference is 0