Ignore:
Timestamp:
03/03/10 14:24:58 (14 years ago)
Author:
tim
Message:

filled in additional, minimal documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/lru_cache.h

    r168 r169  
    1 /**
    2  * @file
    3  *
    4  * Copyright (C) 2008-2009 Timothy D. Morgan
     1/*
     2 * Copyright (C) 2008-2010 Timothy D. Morgan
    53 *
    64 * This program is free software; you can redistribute it and/or modify
     
    1917 * $Id$
    2018 */
     19
     20/**
     21 * @file
     22 *
     23 * A data structure which approximates a least recently used (LRU) cache.
     24 * Implemented as a basic randomized hash table.
     25 */
     26
    2127
    2228#ifndef LRU_CACHE_H
     
    4450};
    4551
     52
     53/** XXX: document this. */
    4654typedef struct _lru_cache
    4755{
     
    5765
    5866
     67/**
     68 * XXX: finish documenting.
     69 */
    5970lru_cache* lru_cache_create(uint32_t max_keys, uint32_t secret);
     71
     72
     73/**
     74 * XXX: finish documenting.
     75 */
    6076lru_cache* lru_cache_create_ctx(void* talloc_ctx, uint32_t max_keys,
    6177                                uint32_t secret, bool talloc_data);
     78
     79
     80/**
     81 * XXX: finish documenting.
     82 */
    6283void lru_cache_destroy(lru_cache* ht);
    6384
    64 /*
    65  *
     85
     86/**
     87 * XXX: finish documenting.
    6688 */
    6789bool lru_cache_update(lru_cache* ht, const void* index,
    6890                      uint32_t index_len, void* data);
    6991
    70 /* Returns pointer to data previously stored at index.
    71  * If no data was found at index, NULL is returned.
     92/**
     93 * XXX: finish documenting.
     94 *
     95 * @return A pointer to data previously stored at index.
     96 *         If no data was found at index, NULL is returned.
    7297 */
    7398void* lru_cache_find(lru_cache* ht, const void* index,
    7499                     uint32_t index_len);
    75100
    76 /* Removes entry from table at index.
    77  * Returns pointer to data that was there previously. 
    78  * Returns NULL if no entry is at index.
     101/**
     102 * XXX: finish documenting.
     103 *
     104 * Removes entry from table at index.
     105 *
     106 * @return A pointer to data that was there previously or NULL if no entry is
     107 *         at index.
    79108 */
    80109bool lru_cache_remove(lru_cache* ht, const void* index,
Note: See TracChangeset for help on using the changeset viewer.