lpcmanager
Clone
Summary
Browse
Changes
Graph
WIP, facing growing complexity, park RightBus as a library approach in favor of kernel module as it was already
RightBusLib
2023-05-11, Edouard Tisserant
c56747a013cc
WIP, facing growing complexity, park RightBus as a library approach in favor of kernel module as it was already
if(!pthread_mutex_lock(&UART_ReadMutex)){
int prevstate;
if((prevstate=uartDevReadBuf_plc_state) == FULL){
uartDevReadBuf_plc_state = LOCKED;
}
pthread_mutex_unlock(&UART_ReadMutex);
if(prevstate == FULL){
%(retrieve_code)s
/* unlock plc buffer */
uartDevReadBuf_plc_state = EMPTY;
}else{
/* No new data -> no update */
}
}