installed fix for range mapping integer overflow

This commit is contained in:
Jeff Hill
2000-06-14 21:11:05 +00:00
parent d6bf15feae
commit 022fb68485

View File

@@ -51,16 +51,28 @@ static SEM_ID threadOnceMutex = 0;
/* osi = 199 - vx */
static unsigned int getOsiPriorityValue(int ossPriority)
{
return(199-ossPriority);
{
if ( ossPriority < 100 ) {
return threadPriorityMax;
}
else if ( ossPriority > 199 ) {
return threadPriorityMin;
}
else {
return ( 199u - (unsigned int) ossPriority );
}
}
static int getOssPriorityValue(unsigned int osiPriority)
{
return(199 - osiPriority);
if ( osiPriority > 99 ) {
return 100;
}
else {
return ( 199 - (signed int) osiPriority );
}
}
unsigned int threadGetStackSize (threadStackSizeClass stackSizeClass)
{