/*
- * 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.
*/
/** \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)
* 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);
* Describes one osl table.
*/
struct osl_table_description {
- /** The directory which contains all files of this table. */
+ /**
+ * The directory which contains all files of this table. This may be
+ * either relative to the cwd or an absolute path.
+ */
const char *dir;
/**
* The table name. A subdirectory of \a dir called \a name is created
*
* 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
* 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.
*
* \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.
*
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.
*