freetdm: remove busy-waiting and use ftdm interrupt to wait for state change completion

This commit is contained in:
Moises Silva
2010-12-30 10:23:56 -05:00
parent 55da2afa7f
commit 903d136481
4 changed files with 61 additions and 51 deletions

View File

@@ -462,6 +462,7 @@ struct ftdm_channel {
ftdm_dtmf_debug_t dtmfdbg;
ftdm_io_dump_t rxdump;
ftdm_io_dump_t txdump;
ftdm_interrupt_t *state_change_notify; /*!< Notify when a state change is terminated */
int32_t txdrops;
int32_t rxdrops;
};

View File

@@ -250,6 +250,8 @@ typedef enum {
#define FTDM_CHANNEL_NONBLOCK (1ULL << 33)
/*!< There is a pending acknowledge for an indication */
#define FTDM_CHANNEL_IND_ACK_PENDING (1ULL << 34)
/*!< There is someone blocking in the channel waiting for state completion */
#define FTDM_CHANNEL_BLOCKING (1ULL << 35)
#include "ftdm_state.h"