| 
    Kannel: Open Source WAP and SMS gateway
    svn-r5336
    
   | 
 
Go to the source code of this file.
Data Structures | |
| struct | load_entry | 
| struct | load | 
Functions | |
| static double | microtime (double *p) | 
| Load * | load_create_real (int heuristic) | 
| int | load_add_interval (Load *load, int interval) | 
| void | load_destroy (Load *load) | 
| void | load_increase_with (Load *load, unsigned long value) | 
| double | load_get (Load *load, int pos) | 
| int | load_len (Load *load) | 
| 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.
      
  | 
  static | 
Definition at line 83 of file load.c.
Referenced by load_add_interval(), load_get(), and load_increase_with().