home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_02 / v7n2080a.txt < prev    next >
Text File  |  1988-09-07  |  2KB  |  71 lines

  1. /*
  2.     HEADER:        CUG000.00;
  3.     TITLE:        Monitor include file;
  4.     DATE:        09/07/88;
  5.     VERSION:    1.0;
  6.     FILENAME:    MONITOR.H;
  7.     SEE-ALSO:    MONITOR.C;
  8.     AUTHORS:    Steve Roggenkamp
  9. */
  10. /*
  11.     monitor.h -- monitor include file
  12.  
  13.    Steve Roggenkamp
  14.    5394 Winetavern Lane
  15.    Dublin, OH  43017
  16.    (614)792-8236
  17.    
  18.    9 / 6 / 88
  19. */
  20.  
  21. #ifndef MONITOR_H
  22. #define MONITOR_H
  23.  
  24. #include "exec/types.h"
  25. #include "exec/nodes.h"
  26. #include "exec/lists.h"
  27. #include "exec/memory.h"
  28. #include "exec/interrupts.h"
  29. #include "exec/ports.h"
  30. #include "exec/libraries.h"
  31. #include "exec/tasks.h"
  32. #include "exec/io.h"
  33. #include "exec/devices.h"
  34. #include "devices/timer.h"
  35. #include "libraries/dos.h"
  36.  
  37. #define MON_NAME(x)  { (void (*)()) x, "x", 0L }
  38. #define STACKDIR        1  /* direction opposite to stack growth
  39.                                      should be  1 if stack grows DOWNWARD
  40.                      should be -1 if stack grows UPWARD */
  41.  
  42. struct monitor_table
  43.     {
  44.     void (*func)();        /* pointer to a function */
  45.     char  *name;           /* function name */
  46.     long   count;          /* count of times function is found */
  47.     };
  48.  
  49. typedef struct monitor_table mon_table;
  50.  
  51. extern struct MsgPort   *CreatePort();
  52. extern struct IORequest *CreateExtIO();
  53.  
  54. long                mon_cmp_addr();     /* compare function addresses */
  55. long                mon_cmp_count();    /* compare function counts */
  56. long                mon_cmp_name();     /* compare function names */
  57. struct timerequest *mon_create_timer(); /* create a timer */
  58. void                mon_delete_timer(); /* delete a timer */
  59. mon_table          *mon_get_func();     /* get a function using the pc */
  60. long                mon_init();         /* initialize the monitor */
  61. void                mon_print();        /* print the function table */
  62. void                mon_sample();       /* sample the monitored task */
  63. void                mon_sort_table();   /* sort the function table */
  64. void                mon_table_qsort();  /* quicksort the function table */
  65. void                mon_task();         /* monitor task entry function */
  66. void                mon_terminate();    /* terminate the monitor & print */
  67. void                mon_trace();        /* print trace back, not used */
  68.  
  69. #endif
  70.  
  71.