rtxUtil.h
00001 /* 00002 * Copyright (c) 2003-2016 Objective Systems, Inc. 00003 * 00004 * This software is furnished under a license and may be used and copied 00005 * only in accordance with the terms of such license and with the 00006 * inclusion of the above copyright notice. This software or any other 00007 * copies thereof may not be provided or otherwise made available to any 00008 * other person. No title to and ownership of the software is hereby 00009 * transferred. 00010 * 00011 * The information in this software is subject to change without notice 00012 * and should not be construed as a commitment by Objective Systems, Inc. 00013 * 00014 * PROPRIETARY NOTICE 00015 * 00016 * This software is an unpublished work subject to a confidentiality agreement 00017 * and is protected by copyright and trade secret law. Unauthorized copying, 00018 * redistribution or other use of this work is prohibited. 00019 * 00020 * The above notice of copyright on this source code product does not indicate 00021 * any actual or intended publication of such source code. 00022 * 00023 *****************************************************************************/ 00024 00025 #ifndef _RTXUTIL_H_ 00026 #define _RTXUTIL_H_ 00027 00028 #include "rtxsrc/osSysTypes.h" 00029 #include "rtxsrc/rtxExternDefs.h" 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 /* Utility functions */ 00036 00037 EXTERNRT OSUINT32 rtxGetIdentByteCount (OSUINT32 ident); 00038 00039 EXTERNRT OSUINT32 rtxIntByteCount (OSINT32 val); 00040 00041 EXTERNRT OSUINT32 rtxOctetBitLen (OSOCTET w); 00042 00043 EXTERNRT OSUINT32 rtxUInt32BitLen (OSUINT32 w); 00044 00052 EXTERNRT OSUINT32 rtxLog2Ceil (OSUINT32 w); 00053 00061 EXTERNRT OSUINT32 rtxLog2Floor (OSUINT32 w); 00062 00063 #if !defined(_NO_INT64_SUPPORT) 00064 EXTERNRT OSUINT32 rtxGetIdent64ByteCount (OSUINT64 ident); 00065 EXTERNRT OSUINT32 rtxUInt64BitLen (OSUINT64 w); 00066 #endif 00067 00068 #ifdef __cplusplus 00069 } 00070 #endif 00071 00072 #endif