diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-16 22:46:55 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-16 22:46:55 +0000 |
commit | 0fa51b5b0a8bfa523974a903f2daa45e797097b5 (patch) | |
tree | 2f2c0aee0224fb978fc27e3d25d606cd96a1edf0 | |
parent | Fixed bug. (diff) | |
download | rtems-0fa51b5b0a8bfa523974a903f2daa45e797097b5.tar.bz2 |
Added code to catch the error of suspend count exceding the counter value.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/itron/src/sus_tsk.c | 4 | ||||
-rw-r--r-- | cpukit/itron/src/sus_tsk.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/c/src/exec/itron/src/sus_tsk.c b/c/src/exec/itron/src/sus_tsk.c index 907b708843..91193ed12a 100644 --- a/c/src/exec/itron/src/sus_tsk.c +++ b/c/src/exec/itron/src/sus_tsk.c @@ -6,6 +6,7 @@ * $Id$ */ +#include <limits.h> #include <itron.h> #include <rtems/score/thread.h> @@ -43,6 +44,9 @@ ER sus_tsk( if ( _Thread_Is_executing( the_thread ) ) _ITRON_return_errorno( E_OBJ ); + if (the_thread->suspend_count == INT_MAX ) + _ITRON_return_errorno( E_QOVR ); + _Thread_Suspend( the_thread ); break; } diff --git a/cpukit/itron/src/sus_tsk.c b/cpukit/itron/src/sus_tsk.c index 907b708843..91193ed12a 100644 --- a/cpukit/itron/src/sus_tsk.c +++ b/cpukit/itron/src/sus_tsk.c @@ -6,6 +6,7 @@ * $Id$ */ +#include <limits.h> #include <itron.h> #include <rtems/score/thread.h> @@ -43,6 +44,9 @@ ER sus_tsk( if ( _Thread_Is_executing( the_thread ) ) _ITRON_return_errorno( E_OBJ ); + if (the_thread->suspend_count == INT_MAX ) + _ITRON_return_errorno( E_QOVR ); + _Thread_Suspend( the_thread ); break; } |