void log_set_suppress( uint64_t context, error_level_t level ) { if( !context ) _log_suppress_default = level; else if( _log_suppress ) hashtable64_set( _log_suppress, context, (uint64_t)level + 1ULL ); }
static void* producer64_thread( object_t thread, void* arg ) { producer64_arg_t* parg = arg; hashtable64_t* table = parg->table; uint64_t key_offset = parg->key_offset; uint64_t key; FOUNDATION_UNUSED( thread ); for( key = 1; key < parg->key_num; ++key ) hashtable64_set( table, key + key_offset, key + key_offset ); thread_yield(); for( key = 1; key < parg->key_num; ++key ) hashtable64_erase( table, key + key_offset ); thread_yield(); for( key = 1; key < parg->key_num; ++key ) hashtable64_set( table, key + key_offset, 1 + ( ( key + key_offset ) % 17 ) ); return 0; }
void stream_set_protocol_handler(const char* protocol, size_t length, stream_open_fn fn) { hashtable64_set(_stream_protocol_table, hash(protocol, length), (uintptr_t)fn); }