Changeset ba1b2194 in mainline for src/time/timeout.c


Ignore:
Timestamp:
2005-10-16T19:49:15Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
75eacab
Parents:
9cefba4
Message:

Doxygen comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/time/timeout.c

    r9cefba4 rba1b2194  
    5353
    5454
    55 /** Initialize empty timeout list
    56  *
    57  * Initialize the timeout list to be empty.
    58  *
    59  * @param t Timeout list to be initialized.
     55/** Reinitialize timeout
     56 *
     57 * Initialize all members except the lock.
     58 *
     59 * @param t Timeout to be initialized.
    6060 *
    6161 */
     
    7070
    7171
    72 /** Initialize timeout list
    73  *
    74  * Initialize the timeout list and its spinlock.
    75  *
    76  * @param t Timeout list to be initialized.
     72/** Initialize timeout
     73 *
     74 * Initialize all members including the lock.
     75 *
     76 * @param t Timeout to be initialized.
    7777 *
    7878 */
     
    8484
    8585
    86 /** Register timeout callback
    87  *
    88  * Insert the timeout handler f (with argument arg)
    89  * to the timeout list and make it execute in
     86/** Register timeout
     87 *
     88 * Insert timeout handler f (with argument arg)
     89 * to timeout list and make it execute in
    9090 * time microseconds (or slightly more).
    9191 *
    92  * @param t    Timeout list.
     92 * @param t    Timeout structure.
    9393 * @param time Number of usec in the future to execute
    9494 *             the handler.
     
    9797 *
    9898 */
    99 void timeout_register(timeout_t *t, __u64 time, timeout_handler f, void *arg)
     99void timeout_register(timeout_t *t, __u64 time, timeout_handler_t f, void *arg)
    100100{
    101101        timeout_t *hlp;
     
    157157
    158158
    159 /** Unregister timeout callback
     159/** Unregister timeout
    160160 *
    161161 * Remove timeout from timeout list.
     
    163163 * @param t Timeout to unregister.
    164164 *
    165  */
    166 int timeout_unregister(timeout_t *t)
     165 * @return true on success, false on failure.
     166 */
     167bool timeout_unregister(timeout_t *t)
    167168{
    168169        timeout_t *hlp;
     
    176177                spinlock_unlock(&t->lock);
    177178                cpu_priority_restore(pri);
    178                 return 0;
     179                return false;
    179180        }
    180181        if (!spinlock_trylock(&t->cpu->timeoutlock)) {
     
    204205
    205206        cpu_priority_restore(pri);
    206         return 1;
    207 }
     207        return true;
     208}
Note: See TracChangeset for help on using the changeset viewer.