Changeset ba1b2194 in mainline


Ignore:
Timestamp:
2005-10-16T19:49:15Z (19 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.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • include/synch/synch.h

    r9cefba4 rba1b2194  
    3030#define __SYNCH_H__
    3131
    32 #define SYNCH_NO_TIMEOUT        0       /**< No timeout is request. */
     32#define SYNCH_NO_TIMEOUT        0       /**< Request with no timeout. */
    3333#define SYNCH_BLOCKING          0       /**< Blocking operation request. */
    3434#define SYNCH_NON_BLOCKING      1       /**< Non-blocking operation request. */
  • include/time/timeout.h

    r9cefba4 rba1b2194  
    3737#define us2ticks(us)    ((__u64)(((__u32) (us)/(1000000/HZ))))
    3838
    39 typedef void (* timeout_handler)(void *arg);
     39typedef void (* timeout_handler_t)(void *arg);
    4040
    4141struct timeout {
    4242        spinlock_t lock;
    4343
    44         link_t link;
     44        link_t link;                    /**< Link to the list of active timeouts on THE->cpu */
    4545       
    46         __u64 ticks;
     46        __u64 ticks;                    /**< Timeout will be activated in this amount of clock() ticks. */
    4747
    48         timeout_handler handler;
    49         void *arg;
     48        timeout_handler_t handler;      /**< Function that will be called on timeout activation. */
     49        void *arg;                      /**< Argument to be passed to handler() function. */
    5050       
    51         cpu_t *cpu;
     51        cpu_t *cpu;                     /**< On which processor is this timeout registered. */
    5252};
    5353
     
    5555extern void timeout_initialize(timeout_t *t);
    5656extern void timeout_reinitialize(timeout_t *t);
    57 extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler f, void *arg);
    58 extern int timeout_unregister(timeout_t *t);
     57extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler_t f, void *arg);
     58extern bool timeout_unregister(timeout_t *t);
    5959
    6060#endif
  • src/preempt/preemption.c

    r9cefba4 rba1b2194  
    3333#include <debug.h>
    3434
     35/** Increment preemption disabled counter. */
    3536void preemption_disable(void)
    3637{
     
    3940}
    4041
     42/** Decrement preemption disabled counter. */
    4143void preemption_enable(void)
    4244{
  • src/time/clock.c

    r9cefba4 rba1b2194  
    5353        link_t *l;
    5454        timeout_t *h;
    55         timeout_handler f;
     55        timeout_handler_t f;
    5656        void *arg;
    5757
  • 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.