Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FIFO for old kernel task #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LevchenkoDmitry
Copy link

Решение заключается в том, что просто создаем очередь, в которую помещаем по одной строке.

@AblakatovMikhail
Copy link
Owner

Драйвер вмещает слишком мало сообщений. Возможно, это связано с размером буфера? Можно ли сделать его динамическим?

Запись:

# for i in  $(seq 1 1024) ; do echo "Message $i with some additional text to inc
rease its size" > /dev/dummy ; done
[  104.926591] [OPENING] It has been opened 1 times
[  104.927446] [CLOSING] It has been closed 1 times
[  104.927874] [OPENING] It has been opened 2 times
[  104.928234] [CLOSING] It has been closed 2 times
[  104.928620] [OPENING] It has been opened 3 times





^C[  127.386324] [CLOSING] It has been closed 3 times

# for i in  $(seq 1 8) ; do echo "Message $i with some additional text to increa
se its size" > /dev/dummy ; done
[  136.539992] [OPENING] It has been opened 4 times


^C[  154.797660] [CLOSING] It has been closed 4 times

Чтение:

# while (true) ; do read_msg=$(cat /dev/dummy) ; if [ -z $read_msg ] ; then brea
k ; fi ; echo $read_msg ; done
[  349.362942] [OPENING] It has been opened 5 times
[  349.387248] [CLOSING] It has been closed 5 times
sh: 1: unknown operand
Message 1 with some additional text to increase its size Message 2 with some additional text to increase its size Message 3 with
[  349.410893] [OPENING] It has been opened 6 times
[  349.411277] [CLOSING] It has been closed 6 times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants