Blame amdgpu/handle_table.h

Packit Service 103f6b
/*
Packit Service 103f6b
 * Copyright 2018 Advanced Micro Devices, Inc.
Packit Service 103f6b
 *
Packit Service 103f6b
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit Service 103f6b
 * copy of this software and associated documentation files (the "Software"),
Packit Service 103f6b
 * to deal in the Software without restriction, including without limitation
Packit Service 103f6b
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit Service 103f6b
 * and/or sell copies of the Software, and to permit persons to whom the
Packit Service 103f6b
 * Software is furnished to do so, subject to the following conditions:
Packit Service 103f6b
 *
Packit Service 103f6b
 * The above copyright notice and this permission notice shall be included in
Packit Service 103f6b
 * all copies or substantial portions of the Software.
Packit Service 103f6b
 *
Packit Service 103f6b
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service 103f6b
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service 103f6b
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit Service 103f6b
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit Service 103f6b
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit Service 103f6b
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit Service 103f6b
 * OTHER DEALINGS IN THE SOFTWARE.
Packit Service 103f6b
 *
Packit Service 103f6b
 */
Packit Service 103f6b
Packit Service 103f6b
#ifndef _HANDLE_TABLE_H_
Packit Service 103f6b
#define _HANDLE_TABLE_H_
Packit Service 103f6b
Packit Service 103f6b
#include <stdint.h>
Packit Service 103f6b
#include "libdrm_macros.h"
Packit Service 103f6b
Packit Service 103f6b
struct handle_table {
Packit Service 103f6b
	uint32_t	max_key;
Packit Service 103f6b
	void		**values;
Packit Service 103f6b
};
Packit Service 103f6b
Packit Service 103f6b
drm_private int handle_table_insert(struct handle_table *table, uint32_t key,
Packit Service 103f6b
				    void *value);
Packit Service 103f6b
drm_private void handle_table_remove(struct handle_table *table, uint32_t key);
Packit Service 103f6b
drm_private void *handle_table_lookup(struct handle_table *table, uint32_t key);
Packit Service 103f6b
drm_private void handle_table_fini(struct handle_table *table);
Packit Service 103f6b
Packit Service 103f6b
#endif /* _HANDLE_TABLE_H_ */