Commit 399839ea authored by Arnaud Blanchard's avatar Arnaud Blanchard

Update the way semaphore are initialised while openned

parent 61027173
......@@ -44,7 +44,7 @@ Press 'q' to quit.
Details
=======
The information about the properties of the blc_channels (type, format, sizes) is stored in a special file: '/tmp/blc_channels.txt'. You are not suppose to use it but you can check at anytime the status of the blc_channels using `./run.sh i_channels` in your blaar directory.
The information about the properties of the blc_channels (type, format, sizes) is stored in a special file: '/tmp/blc_channels.txt'. You are not suppose to use it but you can check at anytime the status of the blc_channels using `./run.sh blc_channels` in your blaar directory.
You will see all the existing blc_channels, the process reading or writing and the possibility to destroy channels.
......@@ -61,13 +61,24 @@ Two semaphores associated to the shared memory are created:
Proccesses which do not consider synchronisation use starting char '/'
`[writer]/->[reader]` means no synchronization
`[writer].->[reader]` means the reader waits for new data from the writer
`[writer]^->[reader]` means the writer waits for the reader to read and acknowledge the data
`[writer]:->[reader]` means both direction synchronization. The writer waits for acknowledgement and the reader wait for new data from the writer.
While opening a channel
-----------------------
In synchronous mode, we assume there is only one reader and writter at a time
- **new 0, ack 1**: The data has been read, the receiver is ready
- **new 1, ack 0**: New data is ready for reading
- **new 0, ack 0**(1): The data is being read or written. This is a scenario where you do not know if you have to wait or if the channel was badly closed
- **new 1, ack 1**(2): The new data has not been read yet. This must not happen as the risk is that you can read and write at the same time
At the initialisation, when a channel is created, **ack** is set to 1
If you have a problem, case (1) you can use the tools blc_channels to manually unlock **ack** or **new**.
C/C++ documentation
===================
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment