Lines Matching refs:table
31 drm_private int handle_table_insert(struct handle_table *table, uint32_t key,
34 if (key >= table->max_key) {
39 values = realloc(table->values, max_key * sizeof(void *));
43 memset(values + table->max_key, 0, (max_key - table->max_key) *
46 table->max_key = max_key;
47 table->values = values;
49 table->values[key] = value;
53 drm_private void handle_table_remove(struct handle_table *table, uint32_t key)
55 if (key < table->max_key)
56 table->values[key] = NULL;
59 drm_private void *handle_table_lookup(struct handle_table *table, uint32_t key)
61 if (key < table->max_key)
62 return table->values[key];
67 drm_private void handle_table_fini(struct handle_table *table)
69 free(table->values);
70 table->max_key = 0;
71 table->values = NULL;