From: regehr Date: Thu, 14 Feb 2008 20:27:36 +0000 (+0000) Subject: new failure handler interface X-Git-Tag: release_tinyos_2_1_0_0~546 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=8b0de9c0b7eabd9eda8e85e26581037240304383;p=tinyos-2.x.git new failure handler interface --- diff --git a/tos/lib/safe/avr/fail.c b/tos/lib/safe/avr/fail.c index f3bf47dd..c74c584b 100644 --- a/tos/lib/safe/avr/fail.c +++ b/tos/lib/safe/avr/fail.c @@ -138,7 +138,7 @@ static inline void load_to_z_and_break (int value) : "=z"(value) : "r" (value)); } -void deputy_fail_noreturn_fast (const char* file, int flid, const char* func) +void deputy_fail_noreturn_fast (int flid) { asm volatile ("cli"); load_to_z_and_break (flid); @@ -171,18 +171,12 @@ void deputy_fail_noreturn_fast (const char* file, int flid, const char* func) } -void deputy_fail_mayreturn(const char *check, const char *text, - const char* file, int line, const char* func) +void deputy_fail_mayreturn(int flid) { - // I don't think this has any meaning without FLID transformation - // FLID transformation stores FLID in line variable - deputy_fail_noreturn_fast(file, line, func); + deputy_fail_noreturn_fast(flid); } -void deputy_fail_noreturn(const char *check, const char *text, - const char* file, int line, const char* func) +void deputy_fail_noreturn(int flid) { - // I don't think this has any meaning without FLID transformation - // FLID transformation stores FLID in line variable - deputy_fail_noreturn_fast(file, line, func); + deputy_fail_noreturn_fast(flid); } diff --git a/tos/lib/safe/msp430/fail.c b/tos/lib/safe/msp430/fail.c index dabc72fa..9c39be55 100644 --- a/tos/lib/safe/msp430/fail.c +++ b/tos/lib/safe/msp430/fail.c @@ -122,7 +122,7 @@ static void display_int_flid (const unsigned int x) } // Not sure how to do this in Telosb without looking it up -void deputy_fail_noreturn_fast (const char* file, int flid, const char* func) +void deputy_fail_noreturn_fast (int flid) { // disable interrupts // set LEDS to output @@ -133,18 +133,12 @@ void deputy_fail_noreturn_fast (const char* file, int flid, const char* func) } -void deputy_fail_mayreturn(const char *check, const char *text, - const char* file, int line, const char* func) +void deputy_fail_mayreturn(int flid) { - // I don't think this has any meaning without FLID transformation - // FLID transformation stores FLID in line variable - deputy_fail_noreturn_fast(file, line, func); + deputy_fail_noreturn_fast(flid); } -void deputy_fail_noreturn(const char *check, const char *text, - const char* file, int line, const char* func) +void deputy_fail_noreturn(int flid) { - // I don't think this has any meaning without FLID transformation - // FLID transformation stores FLID in line variable - deputy_fail_noreturn_fast(file, line, func); + deputy_fail_noreturn_fast(flid); }