I do know that there is no threading for the user program… but there must be something like threads in the OS - e.g. for TCP sockets, timers, …
I had some time ago a similar problem on another system, that’s why I’m wondering it my approach would bring up some unexpected problems.
What I’m going to do:
- open a tcp socket receiving STX/ETX framed messages.
- if a msg is received completely, it will be removed from the incoming stream passing the msg to a list (wm_lst_t)
- another part of sw is checking this list for cmds to be executed (since the cmd execution could take its time I’m going to seperate this part from the socket handling).
And I’m wondering, if there is a (integrated?) mechanism for “locking” a list while manipulating it (e.g. add/remove items).
Does anyone have reflected on this?