cap.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* This file is part of the program psim.
  2. Copyright (C) 1994-1995,1997, Andrew Cagney <cagney@highland.com.au>
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, see <http://www.gnu.org/licenses/>.
  13. */
  14. /* Export a capability data base that maps between internal data
  15. values and those given to a simulation */
  16. #ifndef _CAP_H_
  17. #define _CAP_H_
  18. #include "basics.h"
  19. typedef struct _cap cap;
  20. INLINE_CAP\
  21. (cap *) cap_create
  22. (const char *name);
  23. INLINE_CAP\
  24. (void) cap_init
  25. (cap *db);
  26. INLINE_CAP\
  27. (signed_cell) cap_external
  28. (cap *db,
  29. void *internal);
  30. INLINE_CAP\
  31. (void *) cap_internal
  32. (cap *db,
  33. signed_cell external);
  34. INLINE_CAP\
  35. (void) cap_add
  36. (cap *db,
  37. void *internal);
  38. INLINE_CAP\
  39. (void) cap_remove
  40. (cap *db,
  41. void *internal);
  42. #endif