Commit cfcf36fd authored by Federico Vaga's avatar Federico Vaga

lib: remove static functions from library header

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 472ac478
......@@ -7,7 +7,7 @@ CREATE_SUBDIRS = YES
TAB_SIZE = 8
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_STATIC = YES
EXTRACT_STATIC = NO
CASE_SENSE_NAMES = YES
WARN_NO_PARAMDOC = YES
......
......@@ -100,3 +100,16 @@ void fmctdc_ts_add(struct fmctdc_time *a, struct fmctdc_time *b)
a->seconds += b->seconds;
}
/**
* It compares two time-stamps.
* @param[in] a first time stamp
* @param[in] b second time stamp
* @return like memcmp(2) and strcmp(2)
*/
int _fmctdc_tscmp(struct fmctdc_time *a, struct fmctdc_time *b)
{
/* FIXME integer overflow to be managed */
return a->gseq_id - b->seq_id;
}
......@@ -807,6 +807,18 @@ int fmctdc_reference_set(struct fmctdc_board *userb,
}
/**
* It removes the time reference from a target channel
* @param[in] userb TDC board instance token
* @param[in] ch_target target channel [1, 5]
* @return 0 on success, otherwise -1 and errno is set appropriately
*/
int fmctdc_reference_clear(struct fmctdc_board *userb, int ch_target)
{
return fmctdc_reference_set(userb, ch_target, 0);
}
/**
* It get the current reference channel of a given target channel
* @param[in] userb TDC board instance token
......
......@@ -135,17 +135,7 @@ extern int fmctdc_reference_set(struct fmctdc_board *userb,
unsigned int ch_target, int ch_reference);
extern int fmctdc_reference_get(struct fmctdc_board *userb,
unsigned int ch_target);
/**
* It removes the time reference from a target channel
* @param[in] userb TDC board instance token
* @param[in] ch_target target channel [1, 5]
* @return 0 on success, otherwise -1 and errno is set appropriately
*/
static inline int fmctdc_reference_clear(struct fmctdc_board *userb,
int ch_target)
{
return fmctdc_reference_set(userb, ch_target, 0);
}
extern int fmctdc_reference_clear(struct fmctdc_board *userb, int ch_target);
/**@}*/
......@@ -175,21 +165,12 @@ extern int fmctdc_flush(struct fmctdc_board *userb, unsigned int channel);
* @{
*/
/**
* It compares two time-stamps.
* @param[in] a first time stamp
* @param[in] b second time stamp
* @return like memcmp(2) and strcmp(2)
*/
static inline int _fmctdc_tscmp(struct fmctdc_time *a, struct fmctdc_time *b)
{
/* FIXME integer overflow to be managed */
return a->gseq_id - b->seq_id;
}
extern uint64_t fmctdc_ts_approx_ns(struct fmctdc_time *a);
extern uint64_t fmctdc_ts_ps(struct fmctdc_time *a);
extern void fmctdc_ts_sub(struct fmctdc_time *a, struct fmctdc_time *b);
extern void ft_ts_add(struct fmctdc_time *a, struct fmctdc_time *b);
extern int _fmctdc_tscmp(struct fmctdc_time *a, struct fmctdc_time *b);
/**@}*/
#endif /* __FMCTDC_LIB_H__ */
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