Path: blob/21.2-virgl/src/gallium/drivers/r300/compiler/radeon_list.h
4574 views
/*1* Copyright 2011 Tom Stellard <[email protected]>2*3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining6* a copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sublicense, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial15* portions of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,18* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.20* IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE21* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION22* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION23* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25*/2627#ifndef RADEON_LIST_H28#define RADEON_LIST_H2930struct memory_pool;3132struct rc_list {33void * Item;34struct rc_list * Prev;35struct rc_list * Next;36};3738struct rc_list * rc_list(struct memory_pool * pool, void * item);39void rc_list_add(struct rc_list ** list, struct rc_list * new_value);40void rc_list_remove(struct rc_list ** list, struct rc_list * rm_value);41unsigned int rc_list_count(struct rc_list * list);42void rc_list_print(struct rc_list * list);4344#endif /* RADEON_LIST_H */45464748