mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
add fsctl min_idle_cpu and min-idle-cpu feature to refuse calls after the system fallse below a certian percentage of idle cpu
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16962 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
* this file does not exist!!!!
|
||||
*
|
||||
*/
|
||||
|
||||
#include "switch_profile.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <switch_private.h>
|
||||
#endif
|
||||
@@ -220,6 +223,9 @@ struct switch_runtime {
|
||||
uint32_t runlevel;
|
||||
uint32_t tipping_point;
|
||||
int32_t timer_affinity;
|
||||
switch_profile_timer_t *profile_timer;
|
||||
double profile_time;
|
||||
double min_idle_time;
|
||||
};
|
||||
|
||||
extern struct switch_runtime runtime;
|
||||
|
||||
@@ -1901,7 +1901,7 @@ SWITCH_DECLARE(switch_time_t) switch_core_uptime(void);
|
||||
\param val the command arguement (if needed)
|
||||
\return 0 on success nonzero on error
|
||||
*/
|
||||
SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, int32_t *val);
|
||||
SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *val);
|
||||
|
||||
/*!
|
||||
\brief Get the output console
|
||||
@@ -1970,6 +1970,8 @@ SWITCH_DECLARE(void) switch_time_set_matrix(switch_bool_t enable);
|
||||
SWITCH_DECLARE(void) switch_time_set_cond_yield(switch_bool_t enable);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_min_dtmf_duration(uint32_t duration);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_max_dtmf_duration(uint32_t duration);
|
||||
SWITCH_DECLARE(double) switch_core_min_idle_cpu(double new_limit);
|
||||
SWITCH_DECLARE(double) switch_core_idle_cpu(void);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_default_dtmf_duration(uint32_t duration);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string);
|
||||
|
||||
@@ -1458,7 +1458,8 @@ typedef enum {
|
||||
SCSC_SHUTDOWN_NOW,
|
||||
SCSC_CALIBRATE_CLOCK,
|
||||
SCSC_SAVE_HISTORY,
|
||||
SCSC_CRASH
|
||||
SCSC_CRASH,
|
||||
SCSC_MIN_IDLE_CPU
|
||||
} switch_session_ctl_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user