-@startuml\r
-\r
-hide footbox\r
-\r
-participant "E20 main thread" as main\r
-participant "tdm thread" as sub\r
-\r
-sub <-- : a synchronous event\r
-activate sub\r
---> main: a synchronous event\r
-activate main\r
-sub -> sub: calling thread callbacks in tdm-thread\r
-activate sub\r
-deactivate sub\r
-sub --> main: sending a synchronous event\r
-sub -> sub: pthread_cond_wait\r
-activate sub\r
-main -> main: calling thread callbacks in main-thread\r
-activate main\r
-deactivate main\r
-main --> sub: sending a synchronous event\r
-main -> main: pthread_cond_wait\r
-activate main\r
-deactivate sub\r
-deactivate main\r
-deactivate main\r
-deactivate sub\r
-\r
-... <color #red>(DEADLOCK)</color> ...\r
-note over main, sub\r
- * 만약 main-thread, tdm-thread에서 동시에 synchronous event가 발생되게 되면 deadlock발생됨\r
- - 양쪽에서 모두 pthread_cond_wait에서 대기\r
- * sync event는 한쪽 thread에서만 발생되도록 보장되어야 함.\r
- - tdm-thread -> main-thread방향으로만 sync event전달만 허용\r
- * sync event의 종류\r
- - backend에서 스스로 발생되는 event들만 가능\r
- - output status변경중에 connection/disconnection, virtual output creation/destruction\r
-end note\r
-\r
-@enduml\r
+@startuml
+
+hide footbox
+
+participant "E20 main thread" as main
+participant "tdm thread" as sub
+
+sub <-- : a synchronous event
+activate sub
+--> main: a synchronous event
+activate main
+sub -> sub: calling thread callbacks in tdm-thread
+activate sub
+deactivate sub
+sub --> main: sending a synchronous event
+sub -> sub: pthread_cond_wait
+activate sub
+main -> main: calling thread callbacks in main-thread
+activate main
+deactivate main
+main --> sub: sending a synchronous event
+main -> main: pthread_cond_wait
+activate main
+deactivate sub
+deactivate main
+deactivate main
+deactivate sub
+
+... <color #red>(DEADLOCK)</color> ...
+
+@enduml