Remove rig_lock/unlock as not needed for eventual async i/o implementation

Hamlib-4.4
Mike Black W9MDB 2021-11-24 15:52:37 -06:00
rodzic ada6543b09
commit 71662c79f8
2 zmienionych plików z 0 dodań i 29 usunięć

Wyświetl plik

@ -3181,10 +3181,6 @@ extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec);
extern HAMLIB_EXPORT(int) rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len);
// two functions globally accessible so rig backends can lock for an I/O transaction
void rig_lock();
void rig_unlock();
//! @endcond
__END_DECLS

Wyświetl plik

@ -202,31 +202,6 @@ static const char *const rigerror_table[] =
#define ERROR_TBL_SZ (sizeof(rigerror_table)/sizeof(char *))
#ifdef HAVE_PTHREAD
// Any call to rig_set or rig_get functions will lock the rig
// for non-targetable rigs this will still be problematic for rigctld
// in non-vfo mode as a transaction may be set_vfo/set_x/set_vfo
// this would require the client to request a lock
static pthread_mutex_t rig_lock_mutex = PTHREAD_MUTEX_INITIALIZER;
void rig_lock()
{
#ifdef HAVE_PTHREAD
pthread_mutex_lock(&rig_lock_mutex);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
#endif
}
void rig_unlock()
{
#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&rig_lock_mutex);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
#endif
}
#else
void rig_lock() {};
void rig_unlock() {};
#endif
/*
* track which rig is opened (with rig_open)
* needed at least for transceive mode