home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / aros / include / rt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-07  |  1.1 KB  |  35 lines

  1. #ifndef AROS_RT_H
  2. #define AROS_RT_H
  3.  
  4. /*
  5.     (C) 1995-96 AROS - The Amiga Replacement OS
  6.     Resource Tracking
  7.  
  8. */
  9. #ifndef ENABLE_RT
  10. #   define ENABLE_RT    0
  11. #endif
  12.  
  13. #define RTT_MEMORY    0
  14.  
  15. void RT_Init (void);
  16. void RT_IntAdd (int rtt, char * file, int line, ...); /* Add a resource for tracking */
  17. void RT_IntCheck (int rtt, char * file, int line, ...); /* Check a resource before use */
  18. void RT_IntFree (int rtt, char * file, int line, ...); /* Stop tracking of a resource */
  19. void RT_IntEnter (char * functionname, char * filename, int line);
  20. void RT_Leave (void);
  21.  
  22. #if ENABLE_RT
  23. #   define RT_Add(rtt, args...)    RT_IntAdd (rtt, __FILE__, __LINE__, ##args)
  24. #   define RT_Check(rtt, args...)  RT_IntCheck (rtt, __FILE__, __LINE__, ##args)
  25. #   define RT_Free(rtt, args...)   RT_IntFree (rtt, __FILE__, __LINE__, ##args)
  26. #   define RT_Enter(fn)            RT_IntEnter (fn,__FILE__, __LINE__)
  27. #else
  28. #   define RT_Add(rtt, args...)    /* eps */
  29. #   define RT_Check(rtt, args...)  /* eps */
  30. #   define RT_Free(rtt, args...)   /* eps */
  31. #   define RT_Enter()              /* eps */
  32. #endif
  33.  
  34. #endif /* AROS_RT_H */
  35.