libtimer.h

Go to the documentation of this file.
00001 /*
00002 ** libtimer.h for lseos in lseos-srv/hw/timer
00003 ** 
00004 ** Copyright(c)2004 Vianney Rancurel
00005 ** Login   <vianney@epita.fr>
00006 ** 
00007 ** Started on  Wed Mar  3 12:27:20 2004 Vianney Rancurel
00008 ** Last update Tue Nov 30 17:10:15 2004 Vianney Rancurel
00009 */
00010 #ifndef __LIBTIMER_H__
00011 #define __LIBTIMER_H__  1
00012 #include <libc.h>
00013 
00014 #define SYSTIMER_REGISTER       1
00015 # define TIMERFL_USEC           (1u<<1) /* specifiy time in useconds    */
00016 #define SYSTIMER_UNREGISTER     2
00017 #define SYSTIMER_SFRQ           3       /* set timer intr frq   */
00018 #define SYSTIMER_GFRQ           4       /* get timer intr frq   */
00019 
00020 
00021 
00022 
00023 #define SYSTIMER_GETTIMEOFDAY   9       /* get current time     */
00024 #define SYSTIMER_DUMP           10      /* debug                */
00025 
00026 /* PROTO libtimer.c */
00027 /* libtimer.c */
00028 int timer_register(int usecs, u_int fl);
00029 int timer_unregister(int timer_id);
00030 void delay_fn(int sig);
00031 void delay(u_int usecs);
00032 int timer_dump(void);
00033 int sleep(int secs);
00034 int usleep(int usecs);
00035 u_int ualarm(u_int usecs);
00036 u_int alarm(u_int secs);
00037 int gettimeofday(struct timeval *tp, struct timezone *tzp);
00038 time_t time(time_t *tloc);
00039 char *ctime(const time_t *clock);
00040 int wait_for_srv(int gate, int ntries);
00041 int select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
00042 int poll(struct pollfd *fds, nfds_t nfds, int timeout);
00043 #endif

Generated on Wed May 24 23:05:52 2006 for LSE/OS by  doxygen 1.4.6