};
```
-#
+# build kernel module and user prog
+
+```shell
+$ make
+$ cd ./user && make
+
+```
+
+# create character device script
```shell
-thy@ubuntu24-server:~/linuxyz/kchr-store$ sudo ./dev_create.sh
+$ sudo ./dev_create.sh
dev node created
./user/chr_store
```
```shell
+# dmesg -wH
[ +39.686846] chr_store: dev_major number: 239: init
```
-#
+# run with message
```shell
-thy@ubuntu24-server:~/linuxyz/kchr-store/user$ sudo ./u.out "hello from the other
-side"
+$ sudo ./u.out "hello from the other side"
cmd: [w/q]
main: file opened
thread: failed to open: -1
```
```shell
+# dmesg -wH
[Nov 6 05:01] file opened: 1
[ +1.000207] not possible to open: already occupied: 1
[ +1.000239] not possible to open: already occupied: 1
```
-#
+# closing without saving
```shell
q
```
-#
+# write to the device
```shell
```
-#
+# to see if the other thread can read from device
```shell
q
```
-#
+# close file
```shell
-thy@ubuntu24-server:~/linuxyz/kchr-store$ sudo ./dev_destroy.sh
+$ sudo ./dev_destroy.sh
dev node destroyed
```