?? readme.rt_sig_mmap
字號:
rt_sig_mmap is a chardriver (MAJORD 17 - so check if this is not in use or change it to something that will not conflict (cat /proc/devices...)!)The character driver is registered with the kernel and provides a mmap function that mapps a kmalloc'ed buffer to the user-space on open - thisway the user-space app can directly write to the kmalloc'ed buffer that the rt-thread shares. The rt-thread is not periodic but is triggert bywaking it when the driver is closed - this basically is unsafe as the driver may be closed without having written anything to the buffer sothe buffer is zero'ed after output in the rt-thread, furthermore anyreal driver may implement other functions and thus open/releas need not indicate a mmap call, you can't though call the pthread_kill frommmap as the function does not wait until the user-space app actuallywrote to the buffer.Alternatively one can initialize a semaphor and let the rt-thread wait on thesemaphor, posting in driver_close to wake up the rt-thread.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -