TSG-14342 tsg-service-chaining-engine在空闲时调用marsio_poll_wait让出cpu供其他进程使用
This commit is contained in:
24
common/include/timestamp.h
Normal file
24
common/include/timestamp.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _TIMESTAMP_H
|
||||
#define _TIMESTAMP_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
struct timestamp *timestamp_new(uint64_t update_interval_ms);
|
||||
void timestamp_free(struct timestamp *ts);
|
||||
|
||||
void timestamp_update(struct timestamp *ts);
|
||||
uint64_t timestamp_update_interval_ms(struct timestamp *ts);
|
||||
|
||||
uint64_t timestamp_get_sec(struct timestamp *ts);
|
||||
uint64_t timestamp_get_msec(struct timestamp *ts);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -18,6 +18,14 @@ extern "C"
|
||||
#define LOG_TAG_SF_METRICS "SF_METRICS"
|
||||
#define LOG_TAG_SF_STATUS "SF_STATUS"
|
||||
#define LOG_TAG_SCE "SCE"
|
||||
#define LOG_TAG_TIMESTAMP "TIMESTAMP"
|
||||
|
||||
#define ATOMIC_INC(x) __atomic_fetch_add(x, 1, __ATOMIC_RELAXED)
|
||||
#define ATOMIC_DEC(x) __atomic_fetch_sub(x, 1, __ATOMIC_RELAXED)
|
||||
#define ATOMIC_READ(x) __atomic_fetch_add(x, 0, __ATOMIC_RELAXED)
|
||||
#define ATOMIC_ZERO(x) __atomic_fetch_and(x, 0, __ATOMIC_RELAXED)
|
||||
#define ATOMIC_ADD(x, y) __atomic_fetch_add(x, y, __ATOMIC_RELAXED)
|
||||
#define ATOMIC_SET(x, y) __atomic_store_n(x, y, __ATOMIC_RELAXED)
|
||||
|
||||
/******************************************************************************
|
||||
* fixed_num_array
|
||||
|
||||
Reference in New Issue
Block a user