mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-17 00:34:13 +00:00
svn-style merge from moy.ss7grs_perchan branch (spin off releases.3.2)
addressed issue with multiple GRS at the same time in a single span revisions merged: afcc831d6fa1fccaf7ef091b8c48b905a76d834d 9c815c9ecd7102e7d30c3988cd41682b8cbade0b
This commit is contained in:
1 parent
372ae224e5
commit
ea16afe34e
10 files changed
+684
-480
No files matched your search
@@ -43,14 +43,14 @@ FT_DECLARE(void) ftdm_thread_override_default_stacksize(ftdm_size_t size);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_mutex_create(ftdm_mutex_t **mutex);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_mutex_destroy(ftdm_mutex_t **mutex);
|
||||
|
||||
#define ftdm_mutex_lock(_x) _ftdm_mutex_lock(_x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_lock(ftdm_mutex_t *mutex);
|
||||
#define ftdm_mutex_lock(_x) _ftdm_mutex_lock(__FILE__, __LINE__, __FUNCTION__, _x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_lock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
|
||||
|
||||
#define ftdm_mutex_trylock(_x) _ftdm_mutex_trylock(_x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_trylock(ftdm_mutex_t *mutex);
|
||||
#define ftdm_mutex_trylock(_x) _ftdm_mutex_trylock(__FILE__, __LINE__, __FUNCTION__, _x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_trylock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
|
||||
|
||||
#define ftdm_mutex_unlock(_x) _ftdm_mutex_unlock(_x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_unlock(ftdm_mutex_t *mutex);
|
||||
#define ftdm_mutex_unlock(_x) _ftdm_mutex_unlock(__FILE__, __LINE__, __FUNCTION__, _x)
|
||||
FT_DECLARE(ftdm_status_t) _ftdm_mutex_unlock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
|
||||
|
||||
FT_DECLARE(ftdm_status_t) ftdm_interrupt_create(ftdm_interrupt_t **cond, ftdm_socket_t device);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_interrupt_destroy(ftdm_interrupt_t **cond);
|
||||
|
||||
@@ -719,8 +719,8 @@ FT_DECLARE(ftdm_status_t) ftdm_sigmsg_set_raw_data(ftdm_sigmsg_t *sigmsg, void *
|
||||
*/
|
||||
#define ftdm_socket_close(it) if (it > -1) { close(it); it = -1;}
|
||||
|
||||
#define ftdm_channel_lock(chan) ftdm_mutex_lock(chan->mutex)
|
||||
#define ftdm_channel_unlock(chan) ftdm_mutex_unlock(chan->mutex)
|
||||
#define ftdm_channel_lock(chan) ftdm_mutex_lock((chan)->mutex)
|
||||
#define ftdm_channel_unlock(chan) ftdm_mutex_unlock((chan)->mutex)
|
||||
|
||||
#define ftdm_log_throttle(level, ...) \
|
||||
time_current_throttle_log = ftdm_current_time_in_ms(); \
|
||||
@@ -777,6 +777,13 @@ static __inline__ int16_t ftdm_saturated_add(int16_t sample1, int16_t sample2)
|
||||
return (int16_t)addres;
|
||||
}
|
||||
|
||||
/* Bitmap helper functions */
|
||||
typedef long ftdm_bitmap_t;
|
||||
#define FTDM_BITMAP_NBITS (sizeof(ftdm_bitmap_t) * 8)
|
||||
#define ftdm_map_set_bit(map, bit) (map[(bit/FTDM_BITMAP_NBITS)] |= ((ftdm_bitmap_t)1 << (bit % FTDM_BITMAP_NBITS)))
|
||||
#define ftdm_map_clear_bit(map, bit) (map[(bit/FTDM_BITMAP_NBITS)] &= ~((ftdm_bitmap_t)1 << (bit % FTDM_BITMAP_NBITS)))
|
||||
#define ftdm_map_test_bit(map, bit) (map[(bit/FTDM_BITMAP_NBITS)] & ((ftdm_bitmap_t)1 << (bit % FTDM_BITMAP_NBITS)))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user