Commit 6fd7d211 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Federico Vaga

wrtd:rt: hack to be able to use memcmp

Signed-off-by: 's avatarTomasz Wlostowski <Tomasz.Wlostowski@cern.ch>
Acked-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>


NOTE
This commit has been created by `git subtree` on the Mock Turtle repository
on tag mock-turtle-2.0

This commit will not compile
parent 6d0889f5
......@@ -96,14 +96,22 @@ int trigger_search(struct lrt_hash_entry **tlist,
for a the new entry */
*mid++;
#else
for (*mid = min; *mid < max; (*mid)++) {
cmp = memcmp(&tlist[*mid]->id, id, sizeof(struct wrtd_trig_id));
if (cmp == 0)
return 1;
else if (cmp > 0)
break;
}
/* FIXME Temporary HACK to be able to use memcmp
(smem not byte addressable - VHDL problem) */
volatile struct wrtd_trig_id tmp;
tmp.system = id->system;
tmp.source_port = id->source_port;
tmp.trigger = id->trigger;
for (*mid = min; *mid < max; (*mid)++) {
cmp = memcmp(&tlist[*mid]->id, &tmp, sizeof(struct wrtd_trig_id));
if (cmp == 0)
return 1;
else if (cmp > 0)
break;
}
#endif
#ifdef RTDEBUG
......
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