atmapi.h 889 B

1234567891011121314151617181920212223242526272829
  1. /* atmapi.h - ATM API user space/kernel compatibility */
  2. /* Written 1999,2000 by Werner Almesberger, EPFL ICA */
  3. #ifndef _LINUX_ATMAPI_H
  4. #define _LINUX_ATMAPI_H
  5. #if defined(__sparc__) || defined(__ia64__)
  6. /* such alignment is not required on 32 bit sparcs, but we can't
  7. figure that we are on a sparc64 while compiling user-space programs. */
  8. #define __ATM_API_ALIGN __attribute__((aligned(8)))
  9. #else
  10. #define __ATM_API_ALIGN
  11. #endif
  12. /*
  13. * Opaque type for kernel pointers. Note that _ is never accessed. We need
  14. * the struct in order hide the array, so that we can make simple assignments
  15. * instead of being forced to use memcpy. It also improves error reporting for
  16. * code that still assumes that we're passing unsigned longs.
  17. *
  18. * Convention: NULL pointers are passed as a field of all zeroes.
  19. */
  20. typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
  21. #endif