home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / src / xtimer.h < prev   
Encoding:
C/C++ Source or Header  |  1995-07-08  |  1.9 KB  |  77 lines

  1. /* xtimer.h -- function prototypes and data structures used in xtimer.c. */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_XTIMER_H
  23. #define _GIT_XTIMER_H
  24.  
  25.  
  26. #include <sys/types.h>
  27.  
  28. #ifdef TIME_WITH_SYS_TIME
  29. #include <sys/time.h>
  30. #include <time.h>
  31. #else
  32. #ifdef HAVE_SYS_TIME_H
  33. #include <sys/time.h>
  34. #else
  35. #include <time.h>
  36. #endif
  37. #endif
  38.  
  39. #include "stdc.h"
  40.  
  41.  
  42. #define XT_OFF                  0
  43. #define XT_ON                   1
  44.  
  45. #define XT_NO                   0
  46. #define XT_YES                  1
  47.  
  48. #define XT_SAFE_TO_CALL         1
  49.  
  50.  
  51. typedef struct tag_xtimer_t
  52. {
  53.     /* total count of interrupts occured.  */
  54.     int interrupts;
  55.  
  56.     /* interrupts occured while the hook was safe to call.  */
  57.     int hits;
  58.  
  59.     /* the timer hook function.  */
  60.     void (* hook) __P((struct tag_xtimer_t *, int));
  61.  
  62.     /* xtimer flags.  Actually specifying only if the timer hook is safe
  63.        to call.  */
  64.     int flags;
  65. } xtimer_t;
  66.  
  67.  
  68. typedef void (* xtimer_function) __P((xtimer_t *, int));
  69.  
  70.  
  71. extern void xtimer __P((int));
  72. extern int xtimer_register __P((xtimer_function));
  73. extern void xtimer_set_flags __P((int, int));
  74.  
  75.  
  76. #endif /* _GIT_XTIMER_H */
  77.