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

📄 readme

📁 fsmlabs的real time linux的内核
💻
字号:
This is an example of creating a new rt-thread from within rt-context - itrequires a patch to the original scheduler/rtl_sched.c (found in rtl_sched.patch) basically this patch replaces the calls to kmalloc(...,GFP_KERNEL) by kmalloc(...,GFP_ATOMIC) so that theyare safe for rt-context (they can thoug fail !)Alternatively (and without patching the existing rtlinux scheduler) you couldpreallocate a stack for the new thread (or kmalloc it with the risk of failingin rt-context) and fill in the thread structure, that is basically what pthread_create does just it allocates memory dynamically so it would fail in case you call it without patching rtl_sched.c. Note that the method of assigning a thread structure with prealocated memory has the advantage that it will not fail (the memory is prealocated so you don't need to check) but it does not allow using the common API.new_thread.c   example using pthread_create in rt-context REQUIRES the patchstack_ptr.c    example filling in the attr struct DOES NOT REQUIRE the patchcomments/suggestions/problem reports to der.herr@hofr.atthx !hofrat

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -