Don't use ?:= for setting PREFIX.
[osl.git] / osl.h.in
index 20e930ffae7b567c13ea72975ba1a636e589a290..d5a7d1d92330e02f9f2114a15eb48fdd57c04570 100644 (file)
--- a/osl.h.in
+++ b/osl.h.in
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -7,6 +7,7 @@
 /** \file osl.h User interface for the object storage layer. */
 
 #include <sys/mman.h>
+#include <inttypes.h>
 
 /** Export all declarations in this file. */
 #pragma GCC visibility push(default)
@@ -77,7 +78,7 @@ struct osl_row;
  * specified. Such a function always takes pointers to the two objects to be
  * compared. It must return -1, zero, or 1, if the first argument is considered
  * to  be  respectively less than, equal to, or greater than the second. If two
- * members compare as equal, their order in the sorted array is undefined.
+ * members compare as equal, their order in the rbtree is undefined.
  */
 typedef int osl_compare_func(const struct osl_object *obj1,
        const struct osl_object *obj2);
@@ -94,10 +95,10 @@ typedef int osl_rbtree_loop_func(struct osl_row *row, void *data);
  * Describes one column of a osl table.
  */
 struct osl_column_description {
-       /** One of the tree possible types of storage */
-       enum osl_storage_type storage_type;
-       /** Specifies further properties of the column */
-       enum osl_storage_flags storage_flags;
+       /** One of the tree possible types of storage, \sa osl_storage_type. */
+       uint16_t storage_type;
+       /** Specifies further properties of the column, \sa osl_storage_flags. */
+       uint16_t storage_flags;
        /**
         * The column name determines the name of the directory where all data
         * for this column will be stored. Its hash is stored in the table
@@ -135,8 +136,8 @@ struct osl_table_description {
        const char *name;
        /** The number of columns of this table. */
        uint16_t num_columns;
-       /** Further table-wide information. */
-       enum osl_table_flags flags;
+       /** Further table-wide information, \sa osl_table_flags. */
+       uint8_t flags;
        /** The array describing the individual columns of the table. */
        struct osl_column_description *column_descriptions;
 };
@@ -171,7 +172,7 @@ int osl_create_table(const struct osl_table_description *desc);
  *
  * Each osl table must be opened before its data can be accessed.
  *
- * \param table_desc Describes the table to be opened.
+ * \param desc Describes the table to be opened.
  * \param result Contains a pointer to the open table on success.
  *
  * The table description given by \a desc should coincide with the
@@ -220,7 +221,7 @@ int osl_get_row(const struct osl_table *t, unsigned col_num,
  * Retrieve an object identified by row and column
  *
  * \param t Pointer to an open osl table.
- * \param r Pointer to the row.
+ * \param row Pointer to the row.
  * \param col_num The column number.
  * \param object The result pointer.
  *
@@ -259,9 +260,9 @@ int osl_open_disk_object(const struct osl_table *t,
  *
  * \param obj Pointer to the object previously returned by open_disk_object().
  *
- * \return The return value of the underlying call to para_munmap().
+ * \return The return value of the underlying call to munmap().
  *
- * \sa para_munmap().
+ * \sa munmap(2).
  */
 int osl_close_disk_object(struct osl_object *obj);
 
@@ -313,7 +314,7 @@ int osl_add_row(struct osl_table *t, struct osl_object *objects);
  * This removes all disk storage objects, removes all rbtree nodes,  and frees
  * all volatile objects belonging to the given row. For mapped columns, the
  * data is merely marked invalid and may be pruned from time to time by
- * para_fsck.
+ * osl_fsck.
  *
  * \return Standard.
  */
@@ -444,8 +445,8 @@ int osl_rbtree_last_row(const struct osl_table *t, unsigned col_num,
  * \param result Row is returned here.
  *
  * Retrieve the n-th order statistic with respect to the compare function
- * of the rbtree column \a col_num. In other words, get that row with
- * \a n th greatest value in column \a col_num. It's an error if
+ * of the rbtree column \a col_num. In other words, get the row with
+ * \a n th greatest value in column \a col_num. It is an error if
  * \a col_num is not a rbtree column, or if \a n is larger than the
  * number of rows in the table.
  *
@@ -476,19 +477,6 @@ int osl_get_nth_row(const struct osl_table *t, unsigned col_num,
 int osl_get_rank(const struct osl_table *t, struct osl_row *r,
        unsigned col_num, unsigned *rank);
 
-/**
- * Compare two osl objects pointing to hash values.
- *
- * \param obj1 Pointer to the first hash object.
- * \param obj2 Pointer to the second hash object.
- *
- * \return The values required for an osl compare function.
- *
- * \sa osl_compare_func, uint32_compare().
- */
-int osl_hash_compare(const struct osl_object *obj1,
-               const struct osl_object *obj2);
-
 /**
  * Get a string describing the error code passed in the argument.
  *