kernel/eka/include/nkern/nklib.h
changeset 201 43365a9b78a3
parent 90 947f0dc9f7a8
child 300 1d28c8722707
equal deleted inserted replaced
200:73ea206103e6 201:43365a9b78a3
    83 	TUint64		i64;
    83 	TUint64		i64;
    84 	TUint32		i32[2];
    84 	TUint32		i32[2];
    85 	};
    85 	};
    86 
    86 
    87 
    87 
       
    88 /**
       
    89 @internalComponent
       
    90 
       
    91 Ratio represented = iM*2^iX
       
    92 e.g. 1.0 has iM=0x80000000, iX=-31
       
    93 */
       
    94 struct SRatio
       
    95 	{
       
    96 	void Set(TUint32 aInt, TInt aDivisorExp=0);		// set this ratio to aInt/2^aDivisorExp
       
    97 	TInt Reciprocal();								// this = 1/this
       
    98 	TInt Mult(TUint32& aInt32);						// Multiply aInt32 by this ratio
       
    99 //	TInt Mult(TUint64& aInt64);						// Multiply aInt64 by this ratio
       
   100 
       
   101 	TUint32		iM;		// mantissa, normalised so bit 31=1
       
   102 	TInt16		iX;		// -exponent.
       
   103 	TUint8		iSpare1;
       
   104 	TUint8		iSpare2;
       
   105 	};
       
   106 
       
   107 /**
       
   108 @internalComponent
       
   109 
       
   110 Ratio and inverse ratio
       
   111 */
       
   112 struct SRatioInv
       
   113 	{
       
   114 	void Set(const SRatio* aR);
       
   115 
       
   116 	SRatio		iR;
       
   117 	SRatio		iI;
       
   118 	};
       
   119 
       
   120 
    88 #if defined(__VC32__) || defined(__CW32__)
   121 #if defined(__VC32__) || defined(__CW32__)
    89 extern "C"
   122 extern "C"
    90 /** @internalComponent */
   123 /** @internalComponent */
    91 __NORETURN__ void abort();
   124 __NORETURN__ void abort();
    92 #endif
   125 #endif