Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489

Added a stub exec_get_rt_nap function in the test directory that
always returns false.  That is the cleanest way to satisfy the
call for the unit tests.
This commit is contained in:
Alex Lin 2017-10-20 15:03:31 -05:00
parent ec9d1547ea
commit 6271283c31
2 changed files with 9 additions and 3 deletions

View File

@ -20,11 +20,11 @@ endif
BASE_OBJECTS = ../object_${TRICK_HOST_CPU}/Clock.o\
../object_${TRICK_HOST_CPU}/clock_c_intf.o
BC635_CLOCK_OBJECTS = ${BASE_OBJECTS} BC635Clock_test.o ../object_${TRICK_HOST_CPU}/BC635Clock.o
BC635_CLOCK_OBJECTS = ${BASE_OBJECTS} BC635Clock_test.o ../object_${TRICK_HOST_CPU}/BC635Clock.o exec_get_rt_nap_stub.o
GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o
GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o exec_get_rt_nap_stub.o
TPROCTE_CLOCK_OBJECTS = ${BASE_OBJECTS} TPROCTEClock_test.o ../object_${TRICK_HOST_CPU}/TPROCTEClock.o
TPROCTE_CLOCK_OBJECTS = ${BASE_OBJECTS} TPROCTEClock_test.o ../object_${TRICK_HOST_CPU}/TPROCTEClock.o exec_get_rt_nap_stub.o
# All tests produced by this Makefile. Remember to add new tests you
@ -62,3 +62,5 @@ BC635Clock_test.o : BC635Clock_test.cpp
BC635Clock_test : ${BC635_CLOCK_OBJECTS}
$(TRICK_CPPC) $(TRICK_SYSTEM_LDFLAGS) -o $@ $^ ${LIBS}
exec_get_rt_nap_stub.o : exec_get_rt_nap_stub.cpp
$(TRICK_CPPC) $(TRICK_CPPFLAGS) -c $<

View File

@ -0,0 +1,4 @@
extern "C" int exec_get_rt_nap() {
return 0 ;
}