gallium: Fix uninitialized variable warning in compute test.
[mesa.git] / src / gallium / auxiliary / util / u_handle_table.h
index 51fc273865feefb5284485c00687ffe78ada0de8..2b1d7586a11f9c56e52736d75a0e606d69aae5df 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  *
- * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2008 VMware, Inc.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  **************************************************************************/
 
 /**
+ * @file
  * Generic handle table.
  *  
- * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ * @author José Fonseca <jfonseca@vmware.com>
  */
 
 #ifndef U_HANDLE_TABLE_H_
@@ -42,6 +43,8 @@ extern "C" {
    
 /**
  * Abstract data type to map integer handles to objects.
+ * 
+ * Also referred as "pointer array".
  */
 struct handle_table;
 
@@ -70,6 +73,14 @@ unsigned
 handle_table_add(struct handle_table *ht, 
                  void *object);
 
+/**
+ * Returns zero on failure (out of memory).
+ */
+unsigned
+handle_table_set(struct handle_table *ht, 
+                 unsigned handle,
+                 void *object);
+
 /**
  * Fetch an existing object.
  * 
@@ -89,6 +100,15 @@ void
 handle_table_destroy(struct handle_table *ht);
 
 
+unsigned
+handle_table_get_first_handle(struct handle_table *ht);
+
+
+unsigned
+handle_table_get_next_handle(struct handle_table *ht,
+                             unsigned handle);
+
+
 #ifdef __cplusplus
 }
 #endif