[COMPLIB] Cleanup code by using C99 standard type uintptr_t in preference over compli...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 18 Nov 2009 01:10:54 +0000 (01:10 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 18 Nov 2009 01:10:54 +0000 (01:10 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2586 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/complib/cl_memory.c
core/complib/cl_pool.c
inc/complib/cl_types.h

index eec7a23..6dde71e 100644 (file)
@@ -260,7 +260,7 @@ __cl_malloc_trk(
        p_hdr->p_mem = p_mem;\r
 \r
        /* Insert the header structure into our allocation list. */\r
-       cl_qmap_insert( &gp_mem_tracker->alloc_map, (uintn_t)p_mem, &p_hdr->map_item );\r
+       cl_qmap_insert( &gp_mem_tracker->alloc_map, (uintptr_t)p_mem, &p_hdr->map_item );\r
        cl_spinlock_release( &gp_mem_tracker->lock );\r
 \r
        return( p_mem );\r
@@ -327,7 +327,7 @@ __cl_free_trk(
                 * To the user's data and returns the pointer to header referencing the\r
                 * allocated memory block.\r
                 */\r
-               p_map_item = cl_qmap_get( &gp_mem_tracker->alloc_map, (uintn_t)p_memory );\r
+               p_map_item = cl_qmap_get( &gp_mem_tracker->alloc_map, (uintptr_t)p_memory );\r
                if( p_map_item != cl_qmap_end( &gp_mem_tracker->alloc_map ) )\r
                {\r
                        /* Get the pointer to the header. */\r
index 9562da6..f5128c7 100644 (file)
@@ -129,7 +129,7 @@ cl_qcpool_init(
                 * are aligned on a natural boundary.\r
                 */\r
                p_pool->component_sizes[i] =\r
-                       ROUNDUP( p_pool->component_sizes[i], sizeof(uintn_t) );\r
+                       ROUNDUP( p_pool->component_sizes[i], sizeof(uintptr_t) );\r
        }\r
 \r
        p_pool->max_objects = max_size? max_size : ~(size_t)0;\r
index be7fdda..2773707 100644 (file)
@@ -61,7 +61,7 @@ typedef uint64_t              net64_t;
 *      The offsetof macro returns the offset of a member within a structure.\r
 *\r
 * SYNOPSIS\r
-*      uintn_t\r
+*      uintptr_t\r
 *      offsetof(\r
 *              IN TYPE,\r
 *              IN MEMBER );\r
@@ -82,7 +82,7 @@ typedef uint64_t              net64_t;
 *      PARENT_STRUCT\r
 *********/\r
 #ifndef offsetof\r
-#define offsetof(TYPE, MEMBER) ((uintn_t) &((TYPE *)0)->MEMBER)\r
+#define offsetof(TYPE, MEMBER) ((uintptr_t) &((TYPE *)0)->MEMBER)\r
 #endif\r
 \r
 \r