kopia lustrzana https://github.com/Hamlib/Hamlib
Fix fifo.c mutex handling
rodzic
5446b2c99d
commit
d9b1cfb404
|
@ -27,7 +27,6 @@ int push(FIFO_RIG *fifo, const char *msg)
|
||||||
#ifdef _PTHREAD_H
|
#ifdef _PTHREAD_H
|
||||||
pthread_mutex_lock(&fifo->mutex);
|
pthread_mutex_lock(&fifo->mutex);
|
||||||
#endif
|
#endif
|
||||||
return RIG_OK;
|
|
||||||
int len = strlen(msg);
|
int len = strlen(msg);
|
||||||
|
|
||||||
for (int i = 0; i < len; ++i)
|
for (int i = 0; i < len; ++i)
|
||||||
|
@ -76,10 +75,10 @@ int peek(FIFO_RIG *fifo)
|
||||||
else
|
else
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: peek 0x%02x (%d,%d)\n", __func__, c, fifo->head,
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: peek 0x%02x (%d,%d)\n", __func__, c, fifo->head,
|
||||||
fifo->tail);
|
fifo->tail);
|
||||||
return c;
|
|
||||||
#ifdef _PTHREAD_H
|
#ifdef _PTHREAD_H
|
||||||
pthread_mutex_unlock(&fifo->mutex);
|
pthread_mutex_unlock(&fifo->mutex);
|
||||||
#endif
|
#endif
|
||||||
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pop(FIFO_RIG *fifo)
|
int pop(FIFO_RIG *fifo)
|
||||||
|
|
Ładowanie…
Reference in New Issue