?? readme
字號:
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 + -