summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrew-elder <andrew_elder@pobox.com>2021-06-20 09:08:55 -0400
committerGitHub <noreply@github.com>2021-06-20 09:08:55 -0400
commit885854667949ee2ac8df1defa77752bd86f9c747 (patch)
tree454bf3c805de9c30eedbd4e439febeb67e1f63fb
parentab256bb5d71ff70eeb2bfdb95db8c8bcede94acd (diff)
parent1bcc19f7805dd26af4bfad1db9c152551e52c701 (diff)
downloadOpen-AVB-885854667949ee2ac8df1defa77752bd86f9c747.tar.gz
Merge pull request #913 from MarcinMiklas/fix_launchtime_feature
Added launchtime flag to talker
-rw-r--r--lib/avtp_pipeline/tl/openavb_talker.c10
-rwxr-xr-xlib/avtp_pipeline/tl/openavb_tl.c1
-rwxr-xr-xlib/avtp_pipeline/tl/openavb_tl_pub.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/avtp_pipeline/tl/openavb_talker.c b/lib/avtp_pipeline/tl/openavb_talker.c
index 6794e167..68dd6afd 100644
--- a/lib/avtp_pipeline/tl/openavb_talker.c
+++ b/lib/avtp_pipeline/tl/openavb_talker.c
@@ -127,7 +127,7 @@ bool talkerStartStream(tl_state_t *pTLState)
// setup the initial times
U64 nowNS;
- if (!pCfg->spin_wait) {
+ if (!pCfg->spin_wait && !pCfg->launchtime) {
CLOCK_GETTIME64(OPENAVB_TIMER_CLOCK, &nowNS);
} else {
CLOCK_GETTIME64(OPENAVB_CLOCK_WALLTIME, &nowNS);
@@ -234,13 +234,11 @@ static inline bool talkerDoStream(tl_state_t *pTLState)
if (!pCfg->tx_blocking_in_intf) {
- if (!pCfg->spin_wait) {
+ if (!pCfg->spin_wait && !pCfg->launchtime) {
// sleep until the next interval
SLEEP_UNTIL_NSEC(pTalkerData->nextCycleNS);
- } else {
-#if !IGB_LAUNCHTIME_ENABLED && !ATL_LAUNCHTIME_ENABLED
+ } else if (pCfg->spin_wait) {
SPIN_UNTIL_NSEC(pTalkerData->nextCycleNS);
-#endif
}
//AVB_DBG_INTERVAL(8000, TRUE);
@@ -260,7 +258,7 @@ static inline bool talkerDoStream(tl_state_t *pTLState)
pTalkerData->cntFrames++;
}
- if (!pCfg->spin_wait) {
+ if (!pCfg->spin_wait && !pCfg->launchtime) {
CLOCK_GETTIME64(OPENAVB_TIMER_CLOCK, &nowNS);
} else {
CLOCK_GETTIME64(OPENAVB_CLOCK_WALLTIME, &nowNS);
diff --git a/lib/avtp_pipeline/tl/openavb_tl.c b/lib/avtp_pipeline/tl/openavb_tl.c
index 4fc6eff5..a5529ec5 100755
--- a/lib/avtp_pipeline/tl/openavb_tl.c
+++ b/lib/avtp_pipeline/tl/openavb_tl.c
@@ -394,6 +394,7 @@ EXTERN_DLL_EXPORT void openavbTLInitCfg(openavb_tl_cfg_t *pCfg)
pCfg->vlan_id = 0;
pCfg->fixed_timestamp = 0;
pCfg->spin_wait = FALSE;
+ pCfg->launchtime = IGB_LAUNCHTIME_ENABLED || ATL_LAUNCHTIME_ENABLED;
pCfg->thread_rt_priority = 0;
pCfg->thread_affinity = 0xFFFFFFFF;
diff --git a/lib/avtp_pipeline/tl/openavb_tl_pub.h b/lib/avtp_pipeline/tl/openavb_tl_pub.h
index a5f3da69..5da3f0a5 100755
--- a/lib/avtp_pipeline/tl/openavb_tl_pub.h
+++ b/lib/avtp_pipeline/tl/openavb_tl_pub.h
@@ -150,6 +150,8 @@ typedef struct {
U32 fixed_timestamp;
/// Wait for next observation interval by spinning rather than sleeping
bool spin_wait;
+ /// Do now wait for next observation interval, use launchtime feature
+ bool launchtime;
/// Bit mask used for CPU pinning
U32 thread_affinity;
/// Real time priority of thread.