📄 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 + -