Changeset 9179d0a in mainline


Ignore:
Timestamp:
2006-04-27T17:13:49Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
040e4e9
Parents:
eaa202a
Message:

Add some @file doxygen comments and improve already existing comments.

Files:
29 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/mm/page_ht.c

    reaa202a r9179d0a  
    155155/** Map page to frame using page hash table.
    156156 *
    157  * Map virtual address @page to physical address @frame
    158  * using @flags.
     157 * Map virtual address page to physical address frame
     158 * using flags.
    159159 *
    160160 * The page table must be locked and interrupts must be disabled.
    161161 *
    162  * @param as Address space to which @page belongs.
     162 * @param as Address space to which page belongs.
    163163 * @param page Virtual address of the page to be mapped.
    164164 * @param frame Physical address of memory frame to which the mapping is done.
     
    191191/** Remove mapping of page from page hash table.
    192192 *
    193  * Remove any mapping of @page within address space @as.
     193 * Remove any mapping of page within address space as.
    194194 * TLB shootdown should follow in order to make effects of
    195195 * this call visible.
     
    218218 * The page table must be locked and interrupts must be disabled.
    219219 *
    220  * @param as Address space to wich @page belongs.
     220 * @param as Address space to wich page belongs.
    221221 * @param page Virtual page.
    222222 *
  • genarch/src/mm/page_pt.c

    reaa202a r9179d0a  
    5050/** Map page to frame using hierarchical page tables.
    5151 *
    52  * Map virtual address @page to physical address @frame
    53  * using @flags.
     52 * Map virtual address page to physical address frame
     53 * using flags.
    5454 *
    5555 * The page table must be locked and interrupts must be disabled.
     
    100100/** Remove mapping of page from hierarchical page tables.
    101101 *
    102  * Remove any mapping of 'page' within address space 'as'.
     102 * Remove any mapping of page within address space as.
    103103 * TLB shootdown should follow in order to make effects of
    104104 * this call visible.
     
    108108 * The page table must be locked and interrupts must be disabled.
    109109 *
    110  * @param as Address space to wich @page belongs.
     110 * @param as Address space to wich page belongs.
    111111 * @param page Virtual address of the page to be demapped.
    112112 */
     
    228228 * The page table must be locked and interrupts must be disabled.
    229229 *
    230  * @param as Address space to which @page belongs.
     230 * @param as Address space to which page belongs.
    231231 * @param page Virtual page.
    232232 *
  • generic/src/adt/bitmap.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        bitmap.c
     31 * @brief       Implementation of bitmap ADT.
     32 *
     33 * This file implements bitmap ADT and provides functions for
     34 * setting and clearing ranges of bits.
    2735 */
    2836
  • generic/src/adt/btree.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /*
    30  * This B-tree has the following properties:
    31  * - it is a ballanced 3-4-5 tree (i.e. BTREE_M = 5)
    32  * - values (i.e. pointers to values) are stored only in leaves
    33  * - leaves are linked in a list
    34  * - technically, it is a B+tree (because of the previous properties)
     29/**
     30 * @file        btree.c
     31 * @brief       B+tree implementation.
     32 *
     33 * This file implements B+tree type and operations.
     34 *
     35 * The B+tree has the following properties:
     36 * @li it is a ballanced 3-4-5 tree (i.e. BTREE_M = 5)
     37 * @li values (i.e. pointers to values) are stored only in leaves
     38 * @li leaves are linked in a list
    3539 *
    3640 * Be carefull when using these trees. They need to allocate
  • generic/src/adt/hash_table.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /*
    30  * This is an implementation of generic chained hash table.
     29/**
     30 * @file        hash_table.c
     31 * @brief       Implementation of generic chained hash table.
     32 *
     33 * This file contains implementation of generic chained hash table.
    3134 */
    3235
     
    126129 * @param h Hash table.
    127130 * @param key Array of keys that will be compared against items of the hash table.
    128  * @param keys Number of keys in the 'key' array.
     131 * @param keys Number of keys in the key array.
    129132 */
    130133void hash_table_remove(hash_table_t *h, __native key[], count_t keys)
  • generic/src/adt/list.c

    reaa202a r9179d0a  
    2727 */
    2828
     29/**
     30 * @file        list.c
     31 * @brief       Functions completing doubly linked circular list implementaion.
     32 *
     33 * This file contains some of the functions implementing doubly linked circular lists.
     34 * However, this ADT is mostly implemented in @ref list.h.
     35 */
     36
    2937#include <adt/list.h>
    30 
    3138
    3239/** Check for membership
  • generic/src/ddi/ddi.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28 
     29/**
     30 * @file        ddi.c
     31 * @brief       Device Driver Interface functions.
     32 *
     33 * This file contains functions that comprise the Device Driver Interface.
     34 * These are the functions for mapping physical memory and enabling I/O
     35 * space to tasks.
    2736 */
    2837
  • generic/src/debug/symtab.c

    reaa202a r9179d0a  
    140140/** Symtab completion
    141141 *
    142  * @param name - Search string, completes to symbol name
     142 * @param input - Search string, completes to symbol name
    143143 * @returns - 0 - nothing found, 1 - success, >1 print duplicates
    144144 */
  • generic/src/ipc/sysipc.c

    reaa202a r9179d0a  
    430430 *
    431431 * @param calldata Pointer to buffer where the call/answer data is stored
    432  * @param taskid On 'CONNECT_ME_TO' call it is filled with 'taskid' of
    433  *               the caller.
    434432 * @param flags
    435433 * @return Callid, if callid & 1, then the call is answer
  • generic/src/lib/elf.c

    reaa202a r9179d0a  
    148148 * @param entry Program header entry describing segment to be loaded.
    149149 * @param elf ELF header.
    150  * @parma as Address space into wich the ELF is being loaded.
     150 * @param as Address space into wich the ELF is being loaded.
    151151 *
    152152 * @return EE_OK on success, error code otherwise.
  • generic/src/main/kinit.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        kinit.c
     31 * @brief       Kernel initialization thread.
     32 *
     33 * This file contains kinit kernel thread which carries out
     34 * high level system initialization.
     35 *
     36 * This file is responsible for finishing SMP configuration
     37 * and creation of userspace init tasks.
    2738 */
    2839
  • generic/src/main/main.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        main.c
     31 * @brief       Main initialization kernel function for all processors.
     32 *
     33 * During kernel boot, all processors, after architecture dependent
     34 * initialization, start executing code found in this file. After
     35 * bringing up all subsystems, control is passed to scheduler().
     36 *
     37 * The bootstrap processor starts executing main_bsp() while
     38 * the application processors start executing main_ap().
     39 *
     40 * @see scheduler()
     41 * @see main_bsp()
     42 * @see main_ap()
    2743 */
    2844
  • generic/src/main/uinit.c

    reaa202a r9179d0a  
    2727 */
    2828
     29/**
     30 * @file        uinit.c
     31 * @brief       Userspace bootstrap thread.
     32 *
     33 * This file contains uinit kernel thread wich is used to start every
     34 * userspace thread including threads created by SYS_THREAD_CREATE syscall.
     35 *
     36 * @see SYS_THREAD_CREATE
     37 */
     38 
    2939#include <main/uinit.h>
    3040#include <arch/types.h>
  • generic/src/mm/as.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /*
     29/**
     30 * @file        as.c
     31 * @brief       Address space related functions.
     32 *
    3033 * This file contains address space manipulation functions.
    3134 * Roughly speaking, this is a higher-level client of
    3235 * Virtual Address Translation (VAT) subsystem.
     36 *
     37 * Functionality provided by this file allows one to
     38 * create address space and create, resize and share
     39 * address space areas.
     40 *
     41 * @see page.c
     42 *
    3343 */
    3444
     
    685695 *
    686696 * @param as Address space.
    687  * @param as_locked If false, do not attempt to lock as->lock.
     697 * @param lock If false, do not attempt to lock as->lock.
    688698 */
    689699void page_table_lock(as_t *as, bool lock)
     
    698708 *
    699709 * @param as Address space.
    700  * @param as_locked If false, do not attempt to unlock as->lock.
     710 * @param unlock If false, do not attempt to unlock as->lock.
    701711 */
    702712void page_table_unlock(as_t *as, bool unlock)
  • generic/src/mm/buddy.c

    reaa202a r9179d0a  
    2727 */
    2828
     29/**
     30 * @file        buddy.c
     31 * @brief       Buddy allocator framework.
     32 *
     33 * This file contains buddy system allocator framework.
     34 * Specialized functions are needed for this abstract framework
     35 * to be useful.
     36 */
     37
    2938#include <mm/buddy.h>
    3039#include <mm/frame.h>
  • generic/src/mm/frame.c

    reaa202a r9179d0a  
    2626 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2727 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     28 */
     29
     30/**
     31 * @file        frame.c
     32 * @brief       Physical frame allocator.
     33 *
     34 * This file contains the physical frame allocator and memory zone management.
     35 * The frame allocator is built on top of the buddy allocator.
     36 *
     37 * @see buddy.c
    2838 */
    2939
  • generic/src/mm/page.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /*
    30  * Virtual Address Translation subsystem.
     29/**
     30 * @file        page.c
     31 * @brief       Virtual Address Translation subsystem.
     32 *
     33 * This file contains code for creating, destroying and searching
     34 * mappings between virtual addresses and physical addresses.
     35 * Functions here are mere wrappers that call the real implementation.
     36 * They however, define the single interface.
    3137 */
    3238
     
    7480/** Insert mapping of page to frame.
    7581 *
    76  * Map virtual address @page to physical address @frame
    77  * using @flags. Allocate and setup any missing page tables.
     82 * Map virtual address page to physical address frame
     83 * using flags. Allocate and setup any missing page tables.
    7884 *
    7985 * The page table must be locked and interrupts must be disabled.
     
    94100/** Remove mapping of page.
    95101 *
    96  * Remove any mapping of @page within address space @as.
     102 * Remove any mapping of page within address space as.
    97103 * TLB shootdown should follow in order to make effects of
    98104 * this call visible.
  • generic/src/mm/slab.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /*
    30  * The SLAB allocator is closely modelled after OpenSolaris SLAB allocator
    31  * http://www.usenix.org/events/usenix01/full_papers/bonwick/bonwick_html/
     29/**
     30 * @file        slab.c
     31 * @brief       Slab allocator.
     32 *
     33 * The slab allocator is closely modelled after OpenSolaris slab allocator.
     34 * @see http://www.usenix.org/events/usenix01/full_papers/bonwick/bonwick_html/
    3235 *
    3336 * with the following exceptions:
    34  *   - empty SLABS are deallocated immediately
     37 * @li empty slabs are deallocated immediately
    3538 *     (in Linux they are kept in linked list, in Solaris ???)
    36  *   - empty magazines are deallocated when not needed
     39 * @li empty magazines are deallocated when not needed
    3740 *     (in Solaris they are held in linked list in slab cache)
    3841 *
    39  *   Following features are not currently supported but would be easy to do:
    40  *   - cache coloring
    41  *   - dynamic magazine growing (different magazine sizes are already
     42 * Following features are not currently supported but would be easy to do:
     43 * @li cache coloring
     44 * @li dynamic magazine growing (different magazine sizes are already
    4245 *     supported, but we would need to adjust allocation strategy)
    4346 *
    44  * The SLAB allocator supports per-CPU caches ('magazines') to facilitate
     47 * The slab allocator supports per-CPU caches ('magazines') to facilitate
    4548 * good SMP scaling.
    4649 *
    4750 * When a new object is being allocated, it is first checked, if it is
    4851 * available in CPU-bound magazine. If it is not found there, it is
    49  * allocated from CPU-shared SLAB - if partial full is found, it is used,
     52 * allocated from CPU-shared slab - if partial full is found, it is used,
    5053 * otherwise a new one is allocated.
    5154 *
    5255 * When an object is being deallocated, it is put to CPU-bound magazine.
    5356 * If there is no such magazine, new one is allocated (if it fails,
    54  * the object is deallocated into SLAB). If the magazine is full, it is
     57 * the object is deallocated into slab). If the magazine is full, it is
    5558 * put into cpu-shared list of magazines and new one is allocated.
    5659 *
     
    6164 * 
    6265 * Every cache contains list of full slabs and list of partialy full slabs.
    63  * Empty SLABS are immediately freed (thrashing will be avoided because
     66 * Empty slabs are immediately freed (thrashing will be avoided because
    6467 * of magazines).
    6568 *
    66  * The SLAB information structure is kept inside the data area, if possible.
     69 * The slab information structure is kept inside the data area, if possible.
    6770 * The cache can be marked that it should not use magazines. This is used
    68  * only for SLAB related caches to avoid deadlocks and infinite recursion
    69  * (the SLAB allocator uses itself for allocating all it's control structures).
    70  *
    71  * The SLAB allocator allocates lot of space and does not free it. When
     71 * only for slab related caches to avoid deadlocks and infinite recursion
     72 * (the slab allocator uses itself for allocating all it's control structures).
     73 *
     74 * The slab allocator allocates lot of space and does not free it. When
    7275 * frame allocator fails to allocate the frame, it calls slab_reclaim().
    7376 * It tries 'light reclaim' first, then brutal reclaim. The light reclaim
     
    7780 * magazines.
    7881 *
    79  * TODO: For better CPU-scaling the magazine allocation strategy should
     82 * TODO:@n
     83 * For better CPU-scaling the magazine allocation strategy should
    8084 * be extended. Currently, if the cache does not have magazine, it asks
    8185 * for non-cpu cached magazine cache to provide one. It might be feasible
     
    8690 * magazine cache.
    8791 *
    88  * - it might be good to add granularity of locks even to slab level,
    89  *   we could then try_spinlock over all partial slabs and thus improve
    90  *   scalability even on slab level
    91  */
    92 
     92 * @li it might be good to add granularity of locks even to slab level,
     93 *     we could then try_spinlock over all partial slabs and thus improve
     94 *     scalability even on slab level
     95 */
    9396
    9497#include <synch/spinlock.h>
     
    114117/** Cache for external slab descriptors
    115118 * This time we want per-cpu cache, so do not make it static
    116  * - using SLAB for internal SLAB structures will not deadlock,
     119 * - using slab for internal slab structures will not deadlock,
    117120 *   as all slab structures are 'small' - control structures of
    118121 *   their caches do not require further allocation
     
    142145
    143146/**************************************/
    144 /* SLAB allocation functions          */
     147/* Slab allocation functions          */
    145148
    146149/**
     
    191194
    192195/**
    193  * Deallocate space associated with SLAB
     196 * Deallocate space associated with slab
    194197 *
    195198 * @return number of freed frames
     
    213216
    214217/**************************************/
    215 /* SLAB functions */
     218/* Slab functions */
    216219
    217220
     
    274277        if (list_empty(&cache->partial_slabs)) {
    275278                /* Allow recursion and reclaiming
    276                  * - this should work, as the SLAB control structures
     279                 * - this should work, as the slab control structures
    277280                 *   are small and do not need to allocte with anything
    278281                 *   other ten frame_alloc when they are allocating,
     
    510513
    511514/**************************************/
    512 /* SLAB CACHE functions */
     515/* Slab cache functions */
    513516
    514517/** Return number of objects that fit in certain cache size */
     
    790793        ipl = interrupts_disable();
    791794        spinlock_lock(&slab_cache_lock);
    792         printf("SLAB name\t  Osize\t  Pages\t Obj/pg\t  Slabs\t Cached\tAllocobjs\tCtl\n");
     795        printf("slab name\t  Osize\t  Pages\t Obj/pg\t  Slabs\t Cached\tAllocobjs\tCtl\n");
    793796        for (cur = slab_cache_list.next;cur!=&slab_cache_list; cur=cur->next) {
    794797                cache = list_get_instance(cur, slab_cache_t, link);
  • generic/src/mm/tlb.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        tlb.c
     31 * @brief       Generic TLB shootdown algorithm.
    2732 */
    2833
  • generic/src/proc/scheduler.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        scheduler.c
     31 * @brief       Scheduler and load balancing.
     32 *
     33 * This file contains the scheduler and kcpulb kernel thread wich
     34 * performs load-balancing of per-CPU run queues.
    2735 */
    2836
  • generic/src/proc/task.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        task.c
     31 * @brief       Task management.
    2732 */
    2833
     
    116121/** Create new task with 1 thread and run it
    117122 *
    118  * @param programe_addr Address of program executable image.
     123 * @param program_addr Address of program executable image.
    119124 * @param name Program name.
    120125 *
     
    164169/** Syscall for reading task ID from userspace.
    165170 *
    166  * @param uaddr Userspace address of 8-byte buffer where to store current task ID.
     171 * @param uspace_task_id Userspace address of 8-byte buffer where to store current task ID.
    167172 *
    168173 * @return Always returns 0.
  • generic/src/proc/the.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        the.c
     31 * @brief       THE structure functions.
     32 *
     33 * This file contains functions to manage the THE structure.
     34 * The THE structure exists at the base address of every kernel
     35 * stack and carries information about current settings
     36 * (e.g. current CPU, current thread, task and address space
     37 * and current preemption counter).
    2738 */
    2839
  • generic/src/proc/thread.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        thread.c
     31 * @brief       Thread management functions.
    2732 */
    2833
  • generic/src/synch/condvar.c

    reaa202a r9179d0a  
    7777 *
    7878 * For exact description of possible combinations of
    79  * @usec and @trywait, see comment for waitq_sleep_timeout().
     79 * usec and trywait, see comment for waitq_sleep_timeout().
    8080 *
    8181 * @return See comment for waitq_sleep_timeout().
  • generic/src/synch/futex.c

    reaa202a r9179d0a  
    9494 * @param uaddr Userspace address of the futex counter.
    9595 * @param usec If non-zero, number of microseconds this thread is willing to sleep.
    96  * @param trydown If @usec is zero and trydown is non-zero, conditional operation will be attempted.
     96 * @param trydown If usec is zero and trydown is non-zero, conditional operation will be attempted.
    9797 *
    9898 * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See synch.h.
     
    219219/** Compute hash index into futex hash table.
    220220 *
    221  * @param key Address where the @key (i.e. physical address of futex counter) is stored.
     221 * @param key Address where the key (i.e. physical address of futex counter) is stored.
    222222 *
    223223 * @return Index into futex hash table.
     
    232232 * @param key Address where the key (i.e. physical address of futex counter) is stored.
    233233 *
    234  * @return True if the item matches the @key. False otherwise.
     234 * @return True if the item matches the key. False otherwise.
    235235 */
    236236bool futex_ht_compare(__native *key, count_t keys, link_t *item)
  • generic/src/synch/mutex.c

    reaa202a r9179d0a  
    5252 *
    5353 * For exact description of possible combinations of
    54  * @usec and @trylock, see comment for waitq_sleep_timeout().
     54 * usec and trylock, see comment for waitq_sleep_timeout().
    5555 *
    5656 * @return See comment for waitq_sleep_timeout().
  • generic/src/synch/rwlock.c

    reaa202a r9179d0a  
    2727 */
    2828
    29 /** Reader/Writer locks
     29/**
     30 * @file        rwlock.c
     31 * @brief       Reader/Writer locks.
    3032 *
    3133 * A reader/writer lock can be held by multiple readers at a time.
    3234 * Or it can be exclusively held by a sole writer at a time.
    33  */
    34 
    35 /*
     35 *
    3636 * These locks are not recursive.
    37  * Neither readers nor writers will suffer starvation.
     37 * Because technique called direct hand-off is used, neither readers
     38 * nor writers will suffer starvation.
    3839 *
    3940 * If there is a writer followed by a reader waiting for the rwlock
     
    146147 *
    147148 * For exact description of possible combinations of
    148  * @usec and @trylock, see comment for waitq_sleep_timeout().
     149 * usec and trylock, see comment for waitq_sleep_timeout().
    149150 *
    150151 * @return See comment for waitq_sleep_timeout().
  • generic/src/synch/semaphore.c

    reaa202a r9179d0a  
    6666 *
    6767 * For exact description of possible combinations of
    68  * @usec and @trydown, see comment for waitq_sleep_timeout().
     68 * usec and trydown, see comment for waitq_sleep_timeout().
    6969 *
    7070 * @return See comment for waitq_sleep_timeout().
  • generic/src/synch/waitq.c

    reaa202a r9179d0a  
    2525 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29/**
     30 * @file        waitq.c
     31 * @brief       Wait queue.
     32 *
     33 * Wait queue is the basic synchronization primitive upon all
     34 * other synchronization primitives build.
     35 *
     36 * It allows threads to wait for an event in first-come, first-served
     37 * fashion. Conditional operation as well as timeouts and interruptions
     38 * are supported.
    2739 */
    2840
     
    161173 * @param nonblocking Blocking vs. non-blocking operation mode switch.
    162174 *
    163  * If @usec is greater than zero, regardless of the value of @nonblocking,
     175 * If usec is greater than zero, regardless of the value of nonblocking,
    164176 * the call will not return until either timeout or wakeup comes.
    165177 *
    166  * If @usec is zero and @nonblocking is zero (false), the call
     178 * If usec is zero and @nonblocking is zero (false), the call
    167179 * will not return until wakeup comes.
    168180 *
    169  * If @usec is zero and @nonblocking is non-zero (true), the call will
     181 * If usec is zero and nonblocking is non-zero (true), the call will
    170182 * immediately return, reporting either success or failure.
    171183 *
    172  * @return Returns one of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT,
    173  *         ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED.
    174  *
    175  * ESYNCH_WOULD_BLOCK means that the sleep failed because at the time
     184 * @return      Returns one of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT,
     185 *              ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED.
     186 *
     187 * @li ESYNCH_WOULD_BLOCK means that the sleep failed because at the time
    176188 * of the call there was no pending wakeup.
    177189 *
    178  * ESYNCH_TIMEOUT means that the sleep timed out.
    179  *
    180  * ESYNCH_INTERRUPTED means that somebody interrupted the sleeping thread.
    181  *
    182  * ESYNCH_OK_ATOMIC means that the sleep succeeded and that there was
     190 * @li ESYNCH_TIMEOUT means that the sleep timed out.
     191 *
     192 * @li ESYNCH_INTERRUPTED means that somebody interrupted the sleeping thread.
     193 *
     194 * @li ESYNCH_OK_ATOMIC means that the sleep succeeded and that there was
    183195 * a pending wakeup at the time of the call. The caller was not put
    184196 * asleep at all.
    185197 *
    186  * ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was
     198 * @li ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was
    187199 * attempted.
    188200 */
Note: See TracChangeset for help on using the changeset viewer.