⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtl_sched.patch

📁 fsmlabs的real time linux的内核
💻 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 + -