arch.h | arch.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
/* | /* | |||
* arch_x86.h: trivial definitions for the x86 architecture. | * arch_x86.h: trivial definitions for the x86 architecture. | |||
* | * | |||
* Copyright (c) 2009 Paul E. McKenney, IBM Corporation. | * Copyright (c) 2009 Paul E. McKenney, IBM Corporation. | |||
* Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |||
* | * | |||
* This library is free software; you can redistribute it and/or | * This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | * modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | * License as published by the Free Software Foundation; either | |||
* version 2.1 of the License, or (at your option) any later version. | * version 2.1 of the License, or (at your option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, | * This library is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | * Lesser General Public License for more details. | |||
* | * | |||
* You should have received a copy of the GNU Lesser General Public | * You should have received a copy of the GNU Lesser General Public | |||
* License along with this library; if not, write to the Free Software | * License along with this library; if not, write to the Free Software | |||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |||
*/ | */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
arch_generic.h | arch_generic.h | |||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
/* | /* | |||
* arch_generic.h: common definitions for multiple architectures. | * arch_generic.h: common definitions for multiple architectures. | |||
* | * | |||
* Copyright (c) 2010 Paolo Bonzini <pbonzini@redhat.com> | * Copyright (c) 2010 Paolo Bonzini <pbonzini@redhat.com> | |||
* | * | |||
* This library is free software; you can redistribute it and/or | * This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | * modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | * License as published by the Free Software Foundation; either | |||
* version 2.1 of the License, or (at your option) any later version. | * version 2.1 of the License, or (at your option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, | * This library is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | * Lesser General Public License for more details. | |||
* | * | |||
* You should have received a copy of the GNU Lesser General Public | * You should have received a copy of the GNU Lesser General Public | |||
* License along with this library; if not, write to the Free Software | * License along with this library; if not, write to the Free Software | |||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |||
*/ | */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
compiler.h | compiler.h | |||
---|---|---|---|---|
skipping to change at line 58 | skipping to change at line 58 | |||
#endif | #endif | |||
#if defined(__SIZEOF_LONG__) | #if defined(__SIZEOF_LONG__) | |||
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) | #define BITS_PER_LONG (__SIZEOF_LONG__ * 8) | |||
#elif defined(_LP64) | #elif defined(_LP64) | |||
#define BITS_PER_LONG 64 | #define BITS_PER_LONG 64 | |||
#else | #else | |||
#define BITS_PER_LONG 32 | #define BITS_PER_LONG 32 | |||
#endif | #endif | |||
#define container_of(ptr, type, member) | ||||
\ | ||||
({ \ | ||||
const typeof(((type *)NULL)->member) * __ptr = (ptr); \ | ||||
(type *)((char *)__ptr - offsetof(type, member)); \ | ||||
}) | ||||
#endif /* _URCU_COMPILER_H */ | #endif /* _URCU_COMPILER_H */ | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added | |||