diff options
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/bug.h | 22 | ||||
| -rw-r--r-- | include/asm-generic/errno.h | 4 | ||||
| -rw-r--r-- | include/asm-generic/resource.h | 7 | ||||
| -rw-r--r-- | include/asm-generic/siginfo.h | 13 |
4 files changed, 35 insertions, 11 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index e5913c3b715a..400c2b41896e 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
| 5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_BUG | ||
| 7 | #ifndef HAVE_ARCH_BUG | 8 | #ifndef HAVE_ARCH_BUG |
| 8 | #define BUG() do { \ | 9 | #define BUG() do { \ |
| 9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 10 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
| @@ -11,13 +12,6 @@ | |||
| 11 | } while (0) | 12 | } while (0) |
| 12 | #endif | 13 | #endif |
| 13 | 14 | ||
| 14 | #ifndef HAVE_ARCH_PAGE_BUG | ||
| 15 | #define PAGE_BUG(page) do { \ | ||
| 16 | printk("page BUG for page at %p\n", page); \ | ||
| 17 | BUG(); \ | ||
| 18 | } while (0) | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifndef HAVE_ARCH_BUG_ON | 15 | #ifndef HAVE_ARCH_BUG_ON |
| 22 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) | 16 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) |
| 23 | #endif | 17 | #endif |
| @@ -31,4 +25,18 @@ | |||
| 31 | } while (0) | 25 | } while (0) |
| 32 | #endif | 26 | #endif |
| 33 | 27 | ||
| 28 | #else /* !CONFIG_BUG */ | ||
| 29 | #ifndef HAVE_ARCH_BUG | ||
| 30 | #define BUG() | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #ifndef HAVE_ARCH_BUG_ON | ||
| 34 | #define BUG_ON(condition) do { if (condition) ; } while(0) | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef HAVE_ARCH_WARN_ON | ||
| 38 | #define WARN_ON(condition) do { if (condition) ; } while(0) | ||
| 39 | #endif | ||
| 40 | #endif | ||
| 41 | |||
| 34 | #endif | 42 | #endif |
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h index 4dd2384bc38d..e8852c092fea 100644 --- a/include/asm-generic/errno.h +++ b/include/asm-generic/errno.h | |||
| @@ -102,4 +102,8 @@ | |||
| 102 | #define EKEYREVOKED 128 /* Key has been revoked */ | 102 | #define EKEYREVOKED 128 /* Key has been revoked */ |
| 103 | #define EKEYREJECTED 129 /* Key was rejected by service */ | 103 | #define EKEYREJECTED 129 /* Key was rejected by service */ |
| 104 | 104 | ||
| 105 | /* for robust mutexes */ | ||
| 106 | #define EOWNERDEAD 130 /* Owner died */ | ||
| 107 | #define ENOTRECOVERABLE 131 /* State not recoverable */ | ||
| 108 | |||
| 105 | #endif | 109 | #endif |
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h index b1fcda9eac23..cfe3692b23e5 100644 --- a/include/asm-generic/resource.h +++ b/include/asm-generic/resource.h | |||
| @@ -41,8 +41,11 @@ | |||
| 41 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ | 41 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ |
| 42 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ | 42 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ |
| 43 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ | 43 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ |
| 44 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to | ||
| 45 | 0-39 for nice level 19 .. -20 */ | ||
| 46 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ | ||
| 44 | 47 | ||
| 45 | #define RLIM_NLIMITS 13 | 48 | #define RLIM_NLIMITS 15 |
| 46 | 49 | ||
| 47 | /* | 50 | /* |
| 48 | * SuS says limits have to be unsigned. | 51 | * SuS says limits have to be unsigned. |
| @@ -81,6 +84,8 @@ | |||
| 81 | [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 84 | [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
| 82 | [RLIMIT_SIGPENDING] = { 0, 0 }, \ | 85 | [RLIMIT_SIGPENDING] = { 0, 0 }, \ |
| 83 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ | 86 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ |
| 87 | [RLIMIT_NICE] = { 0, 0 }, \ | ||
| 88 | [RLIMIT_RTPRIO] = { 0, 0 }, \ | ||
| 84 | } | 89 | } |
| 85 | 90 | ||
| 86 | #endif /* __KERNEL__ */ | 91 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 9cac8e8dde51..8786e01e0db8 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
| @@ -236,11 +236,18 @@ typedef struct siginfo { | |||
| 236 | #define SIGEV_THREAD 2 /* deliver via thread creation */ | 236 | #define SIGEV_THREAD 2 /* deliver via thread creation */ |
| 237 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ | 237 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ |
| 238 | 238 | ||
| 239 | #define SIGEV_MAX_SIZE 64 | 239 | /* |
| 240 | #ifndef SIGEV_PAD_SIZE | 240 | * This works because the alignment is ok on all current architectures |
| 241 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) | 241 | * but we leave open this being overridden in the future |
| 242 | */ | ||
| 243 | #ifndef __ARCH_SIGEV_PREAMBLE_SIZE | ||
| 244 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) | ||
| 242 | #endif | 245 | #endif |
| 243 | 246 | ||
| 247 | #define SIGEV_MAX_SIZE 64 | ||
| 248 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ | ||
| 249 | / sizeof(int)) | ||
| 250 | |||
| 244 | typedef struct sigevent { | 251 | typedef struct sigevent { |
| 245 | sigval_t sigev_value; | 252 | sigval_t sigev_value; |
| 246 | int sigev_signo; | 253 | int sigev_signo; |
