Commit 31fcb116 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

su: removed private functions accidentally declared as globals

su_t64_to_time(), mutex_trylocker(), su_port_set_system_preferences()

darcs-hash:20081208145904-db55f-35a15648bd961c5d7c95150b86bf3f252098ce12.gz
parent c72c804f
......@@ -37,6 +37,8 @@
#include "config.h"
#include <sofia-sip/heap.h>
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
......
......@@ -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) */
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment