本文整理汇总了C++中TS_HASH函数的典型用法代码示例。如果您正苦于以下问题:C++ TS_HASH函数的具体用法?C++ TS_HASH怎么用?C++ TS_HASH使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TS_HASH函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: zend_ts_hash_clean
ZEND_API void zend_ts_hash_clean(TsHashTable *ht)
{
ht->reader = 0;
begin_write(ht);
zend_hash_clean(TS_HASH(ht));
end_write(ht);
}
示例2: zend_ts_hash_destroy
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
{
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
tsrm_mutex_free(ht->mx_writer);
#endif
zend_hash_destroy(TS_HASH(ht));
}
示例3: _zend_ts_hash_init_ex
ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
return _zend_hash_init_ex(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_RELAY_CC);
}
示例4: _zend_ts_hash_init
/* delegates */
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
_zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
}
示例5: zend_ts_hash_exists
ZEND_API int zend_ts_hash_exists(TsHashTable *ht, zend_string *key)
{
int retval;
begin_read(ht);
retval = zend_hash_exists(TS_HASH(ht), key);
end_read(ht);
return retval;
}
示例6: begin_read
ZEND_API zval *zend_ts_hash_index_find(TsHashTable *ht, zend_ulong h)
{
zval *retval;
begin_read(ht);
retval = zend_hash_index_find(TS_HASH(ht), h);
end_read(ht);
return retval;
}
示例7: zend_ts_hash_index_del
ZEND_API int zend_ts_hash_index_del(TsHashTable *ht, zend_ulong h)
{
int retval;
begin_write(ht);
retval = zend_hash_index_del(TS_HASH(ht), h);
end_write(ht);
return retval;
}
示例8: zend_ts_hash_del
ZEND_API int zend_ts_hash_del(TsHashTable *ht, zend_string *key)
{
int retval;
begin_write(ht);
retval = zend_hash_del(TS_HASH(ht), key);
end_write(ht);
return retval;
}
示例9: zend_ts_hash_apply_with_arguments
ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...)
{
va_list args;
va_start(args, num_args);
begin_write(ht);
zend_hash_apply_with_arguments(TS_HASH(ht), apply_func, num_args, args);
end_write(ht);
va_end(args);
}
示例10: zend_ts_hash_index_exists
ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, zend_ulong h)
{
int retval;
begin_read(ht);
retval = zend_hash_index_exists(TS_HASH(ht), h);
end_read(ht);
return retval;
}
示例11: zend_ts_hash_sort
ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber)
{
int retval;
begin_write(ht);
retval = zend_hash_sort_ex(TS_HASH(ht), sort_func, compare_func, renumber);
end_write(ht);
return retval;
}
示例12: zend_ts_hash_add_empty_element
ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_write(ht);
retval = zend_hash_add_empty_element(TS_HASH(ht), arKey, nKeyLength);
end_write(ht);
return retval;
}
示例13: begin_write
ZEND_API zval *zend_ts_hash_add_empty_element(TsHashTable *ht, zend_string *key)
{
zval *retval;
begin_write(ht);
retval = zend_hash_add_empty_element(TS_HASH(ht), key);
end_write(ht);
return retval;
}
示例14: _zend_ts_hash_quick_add_or_update
ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
int retval;
begin_write(ht);
retval = _zend_hash_quick_add_or_update(TS_HASH(ht), arKey, nKeyLength, h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_RELAY_CC);
end_write(ht);
return retval;
}
示例15: _zend_ts_hash_index_update_or_next_insert
ZEND_API int _zend_ts_hash_index_update_or_next_insert(TsHashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
int retval;
begin_write(ht);
retval = _zend_hash_index_update_or_next_insert(TS_HASH(ht), h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_RELAY_CC);
end_write(ht);
return retval;
}