Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include <time.h>
Go to the source code of this file.
Macros | |
#define | load_create() load_create_real(1) |
#define | load_increase(load) load_increase_with(load, 1) |
Typedefs | |
typedef struct load | Load |
Functions | |
Load * | load_create_real (int heuristic) |
int | load_add_interval (Load *load, int interval) |
void | load_increase_with (Load *load, unsigned long value) |
void | load_destroy (Load *load) |
double | load_get (Load *load, int pos) |
int | load_len (Load *load) |
#define load_create | ( | ) | load_create_real(1) |
Definition at line 78 of file load.h.
Referenced by init_bearerbox(), and smscconn_create().
#define load_increase | ( | load | ) | load_increase_with(load, 1) |
Definition at line 94 of file load.h.
Referenced by at2_send_messages(), bb_smscconn_receive(), bb_smscconn_receive_internal(), bb_smscconn_sent(), and send_messages().
int load_add_interval | ( | Load * | load, |
int | interval | ||
) |
Add load measure interval. - load object - measure interval in seconds
Definition at line 111 of file load.c.
References load_entry::curr, load_entry::dirty, load::entries, gw_rwlock_unlock(), gw_rwlock_wrlock(), load_entry::interval, interval, load_entry::last, load::len, load::lock, microtime(), and load_entry::prev.
Referenced by init_bearerbox(), smpp_create(), smsc_at2_create(), and smscconn_create().
Load* load_create_real | ( | int | heuristic | ) |
Create new Load object. - 0 disable heuristic (means get always current load); 1 enable
Definition at line 97 of file load.c.
References load::entries, gw_rwlock_create(), load::heuristic, load::len, and load::lock.
Referenced by smpp_create(), and smsc_at2_create().
void load_destroy | ( | Load * | load | ) |
Destroy load object. - load object
Definition at line 145 of file load.c.
References load::entries, gw_rwlock_destroy(), load::len, and load::lock.
Referenced by at2_device_thread(), empty_msg_lists(), smpp_destroy(), and smscconn_destroy().
double load_get | ( | Load * | load, |
int | pos | ||
) |
Get measured load value at position .
Definition at line 191 of file load.c.
References load_entry::curr, load_entry::dirty, load::entries, gw_rwlock_rdlock(), gw_rwlock_unlock(), load::heuristic, load_entry::last, load::len, load_increase_with(), load::lock, microtime(), and load_entry::prev.
Referenced by at2_send_messages(), bb_print_status(), send_messages(), and smsc2_status().
void load_increase_with | ( | Load * | load, |
unsigned long | value | ||
) |
Increase load values with . - load object - how much to increase
Definition at line 161 of file load.c.
References load_entry::curr, load_entry::dirty, load::entries, gw_rwlock_unlock(), gw_rwlock_wrlock(), load_entry::interval, load_entry::last, load::len, load::lock, microtime(), and load_entry::prev.
Referenced by load_get().
int load_len | ( | Load * | load | ) |
Get length of intervals.
Definition at line 221 of file load.c.
References gw_rwlock_rdlock(), gw_rwlock_unlock(), load::len, and load::lock.