Mon Dec 8 08:59:04 CST 2008 Pekka Pessi <first.last@nokia.com>

* su: removed private functions accidentally declared as globals
  
  su_t64_to_time(), mutex_trylocker(), su_port_set_system_preferences()



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10814 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-12-16 19:53:46 +00:00
parent 6e67acc50b
commit 69faddccba
8 changed files with 31 additions and 16 deletions

View File

@ -1 +1 @@
Tue Dec 16 13:51:53 CST 2008
Tue Dec 16 13:52:51 CST 2008

View File

@ -37,6 +37,8 @@
#include "config.h"
#include <sofia-sip/heap.h>
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>

View File

@ -111,6 +111,19 @@ SOFIAPUBFUN uint32_t su_ntp_mw(su_ntp_t ntp);
SOFIAPUBFUN uint32_t su_ntp_fraq(su_time_t t);
SOFIAPUBFUN uint32_t su_time_ms(su_time_t t);
#else
su_inline uint32_t su_ntp_fraq(su_time_t t);
su_inline uint32_t su_time_ms(su_time_t t);
#endif
SOFIAPUBFUN su_ntp_t su_ntp_hilo(uint32_t hi, uint32_t lo);
SOFIAPUBFUN uint64_t su_counter(void);
SOFIAPUBFUN uint64_t su_nanocounter(void);
SOFIAPUBFUN uint32_t su_random(void);
#if SU_HAVE_INLINE
/** Middle 32 bit of NTP timestamp. */
su_inline uint32_t su_ntp_fraq(su_time_t t)
{
@ -129,14 +142,6 @@ su_inline uint32_t su_time_ms(su_time_t t)
}
#endif
SOFIAPUBFUN su_ntp_t su_ntp_hilo(uint32_t hi, uint32_t lo);
SOFIAPUBFUN uint64_t su_counter(void);
SOFIAPUBFUN uint64_t su_nanocounter(void);
SOFIAPUBFUN uint32_t su_random();
SOFIA_END_DECLS
#endif /* !defined(SU_TIME_H) */

View File

@ -57,7 +57,7 @@ static int mutex_locker(void *_mutex)
return pthread_mutex_lock(mutex + 1);
}
int mutex_trylocker(void *_mutex)
static int mutex_trylocker(void *_mutex)
{
pthread_mutex_t *mutex = _mutex;
return pthread_mutex_trylock(mutex + 1);

View File

@ -106,6 +106,7 @@ void su_port_prefer(su_port_create_f *create,
if (start) preferred_su_clone_start = start;
}
static
void su_port_set_system_preferences(char const *name)
{
su_port_create_f *create = preferred_su_port_create;

View File

@ -168,6 +168,8 @@ SOFIAPUBFUN su_root_t *su_root_create_with_port(su_root_magic_t *magic,
SOFIAPUBFUN char const *su_port_name(su_port_t const *port);
SOFIAPUBFUN int su_timer_reset_all(su_timer_queue_t *, su_task_r );
/* ---------------------------------------------------------------------- */
/* React to multiple events per one poll() to make sure

View File

@ -115,6 +115,14 @@ struct su_root_s;
* Contains hint of number of sockets supported by su_root_t */
int su_root_size_hint = 64;
/* ====================================================================== */
_su_task_r su_task_new(su_task_r task, su_root_t *root, su_port_t *port);
int su_task_attach(su_task_r self, su_root_t *root);
int su_task_detach(su_task_r self);
int su_timer_reset_all(su_timer_t **t0, su_task_r);
/* =========================================================================
* Tasks
*/
@ -348,12 +356,6 @@ int su_task_execute(su_task_r const task,
}
}
_su_task_r su_task_new(su_task_r task, su_root_t *root, su_port_t *port);
int su_task_attach(su_task_r self, su_root_t *root);
int su_task_detach(su_task_r self);
int su_timer_reset_all(su_timer_t **t0, su_task_r);
/* Note that is *not* necessary same as su_root_t,
* as su_root_t can be extended */

View File

@ -202,6 +202,8 @@ su_duration_t su_duration(su_time_t const t1, su_time_t const t2)
typedef uint64_t su_t64_t; /* time with 64 bits */
static su_time_t su_t64_to_time(su_t64_t const us);
const uint32_t su_res32 = 1000000UL;
const su_t64_t su_res64 = (su_t64_t)1000000UL;
@ -307,6 +309,7 @@ uint32_t su_ntp_mw(su_ntp_t ntp)
return (uint32_t) (ntp >> 16) & 0xffffffffLU;
}
static
su_time_t su_t64_to_time(su_t64_t const us)
{
su_time_t tv;