xref: /linux/include/uapi/linux/atmapi.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells /* atmapi.h - ATM API user space/kernel compatibility */
3607ca46eSDavid Howells 
4607ca46eSDavid Howells /* Written 1999,2000 by Werner Almesberger, EPFL ICA */
5607ca46eSDavid Howells 
6607ca46eSDavid Howells 
7607ca46eSDavid Howells #ifndef _LINUX_ATMAPI_H
8607ca46eSDavid Howells #define _LINUX_ATMAPI_H
9607ca46eSDavid Howells 
10607ca46eSDavid Howells #if defined(__sparc__) || defined(__ia64__)
11607ca46eSDavid Howells /* such alignment is not required on 32 bit sparcs, but we can't
12607ca46eSDavid Howells    figure that we are on a sparc64 while compiling user-space programs. */
13607ca46eSDavid Howells #define __ATM_API_ALIGN	__attribute__((aligned(8)))
14607ca46eSDavid Howells #else
15607ca46eSDavid Howells #define __ATM_API_ALIGN
16607ca46eSDavid Howells #endif
17607ca46eSDavid Howells 
18607ca46eSDavid Howells 
19607ca46eSDavid Howells /*
20607ca46eSDavid Howells  * Opaque type for kernel pointers. Note that _ is never accessed. We need
21607ca46eSDavid Howells  * the struct in order hide the array, so that we can make simple assignments
22607ca46eSDavid Howells  * instead of being forced to use memcpy. It also improves error reporting for
23607ca46eSDavid Howells  * code that still assumes that we're passing unsigned longs.
24607ca46eSDavid Howells  *
25607ca46eSDavid Howells  * Convention: NULL pointers are passed as a field of all zeroes.
26607ca46eSDavid Howells  */
27607ca46eSDavid Howells 
28607ca46eSDavid Howells typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
29607ca46eSDavid Howells 
30607ca46eSDavid Howells #endif
31