?? rtl_sched.patch
字號:
--- rtl_sched.c.org Sun Sep 15 13:14:09 2002+++ rtl_sched.c Sun Sep 15 14:01:11 2002@@ -584,18 +584,27 @@ pthread_attr_t default_attr; int stack_size; if (!attr) {+ /* if the creat is from rt-context the attributes must be+ * passed to pthread_create - hofrat+ */+ if (pthread_self() != pthread_linux()) {+ return EAGAIN;+ }+ else { pthread_attr_init(&default_attr); attr = &default_attr;+ } } stack_size = attr->stack_size; stack_addr = (int *) attr->stack_addr; if (!stack_addr) {- if (pthread_self() != pthread_linux()) {- return EAGAIN;- }- stack_addr = (int *) kmalloc(stack_size, GFP_KERNEL);+ /* as long as we use GFP_ATOMIC we should be safe (?) + * so no need to check if we are in kernel or rt-context+ * hofrat+ */+ stack_addr = (int *) kmalloc(stack_size, GFP_ATOMIC); task = (struct rtl_thread_struct *) stack_addr; if (!task) { return EAGAIN;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -