]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[OPENSM_3] C99 & uintn_t changes.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 20 Nov 2009 00:32:54 +0000 (00:32 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 20 Nov 2009 00:32:54 +0000 (00:32 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2589 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/opensm_3/user/include/opensm/osm_mcast_tbl.h
branches/opensm_3/user/include/opensm/st.h
branches/opensm_3/user/include/vendor/winosm_common.h
branches/opensm_3/user/opensm/osm_mcast_tbl.c
branches/opensm_3/user/opensm/osm_sa_multipath_record.c
branches/opensm_3/user/opensm/osm_sa_path_record.c
branches/opensm_3/user/opensm/osm_subnet.c

index 6d192e43833c422f8f5adedcb1b775e50e3e3b00..55f65288717d207534c78c7a2882ac3f8e7d6349 100644 (file)
@@ -174,7 +174,7 @@ void osm_mcast_tbl_delete(IN osm_mcast_tbl_t ** pp_tbl);
 *\r
 * SYNOPSIS\r
 */\r
-int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset);\r
+int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN unsigned mlid_offset);\r
 /*\r
 * PARAMETERS\r
 *\r
index 7fabba6f24439220277da73f57e4fb8a99a3d252..b6e405d40d929cd82d8694380a82f010f30f9814 100644 (file)
@@ -39,6 +39,7 @@
 #define ST_INCLUDED\r
 \r
 #include <stdlib.h>\r
+#include <inttypes.h>\r
 \r
 #ifdef __cplusplus\r
 #  define BEGIN_C_DECLS extern "C" {\r
index 032d542361b2fef6c100e5d9802c41e82f4d6471..e65eb4f8df96ae3373b9d92267dc8afa70d64439 100644 (file)
@@ -71,10 +71,10 @@ typedef int ssize_t;
 #define pthread_mutex_lock cl_mutex_acquire\r
 #define pthread_mutex_unlock cl_mutex_release\r
 #define pthread_mutex_init(a,b) cl_mutex_init((a))\r
-#define pthread_mutex_destroy(a) cl_mutex_destroy(a)\r
+#define pthread_mutex_destroy cl_mutex_destroy\r
 \r
 #define pthread_cond_init(a,b)\r
-#define pthread_cond_signal(a) cl_event_signal(a)\r
+#define pthread_cond_signal cl_event_signal\r
 #define pthread_cond_destroy(a)\r
 \r
 \r
index 0b2d5f671aae437305c10e66a62505b128556b25..13df4c47420ac952ba1995479695c0ecd29f20b6 100644 (file)
@@ -94,9 +94,7 @@ void osm_mcast_tbl_destroy(IN osm_mcast_tbl_t * p_tbl)
 void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho,\r
                       IN uint8_t port)\r
 {\r
-       uintn_t mlid_offset;\r
-       uintn_t mask_offset;\r
-       uintn_t bit_mask;\r
+       unsigned mlid_offset, mask_offset, bit_mask;\r
        int16_t block_num;\r
 \r
        CL_ASSERT(p_tbl && p_tbl->p_mask_tbl);\r
@@ -116,7 +114,7 @@ void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho,
 \r
 /**********************************************************************\r
  **********************************************************************/\r
-int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset)\r
+int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN unsigned mlid_offset)\r
 {\r
        size_t mft_depth, size;\r
        uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX];\r
@@ -154,9 +152,7 @@ done:
 boolean_t osm_mcast_tbl_is_port(IN const osm_mcast_tbl_t * p_tbl,\r
                                IN uint16_t mlid_ho, IN uint8_t port_num)\r
 {\r
-       uintn_t mlid_offset;\r
-       uintn_t mask_offset;\r
-       uintn_t bit_mask;\r
+       unsigned mlid_offset, mask_offset, bit_mask;\r
 \r
        CL_ASSERT(p_tbl);\r
 \r
@@ -183,7 +179,7 @@ boolean_t osm_mcast_tbl_is_port(IN const osm_mcast_tbl_t * p_tbl,
 boolean_t osm_mcast_tbl_is_any_port(IN const osm_mcast_tbl_t * p_tbl,\r
                                    IN uint16_t mlid_ho)\r
 {\r
-       uintn_t mlid_offset;\r
+       unsigned mlid_offset;\r
        uint8_t position;\r
        uint16_t result = 0;\r
 \r
@@ -240,7 +236,7 @@ ib_api_status_t osm_mcast_tbl_set_block(IN osm_mcast_tbl_t * p_tbl,
 void osm_mcast_tbl_clear_mlid(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho)\r
 {\r
        uint8_t i;\r
-       uintn_t mlid_offset;\r
+       unsigned mlid_offset;\r
 \r
        CL_ASSERT(p_tbl);\r
        CL_ASSERT(mlid_ho >= IB_LID_MCAST_START_HO);\r
index 2f73985e01428ba7fa6a719639a4a188186f7dc6..70899672feb8afd012b6d854c4e0332485b11f85 100644 (file)
@@ -884,8 +884,7 @@ static uint32_t mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
        uint16_t dest_lid_ho;\r
        uint32_t path_num = 0;\r
        uint8_t preference;\r
-       uintn_t src_offset;\r
-       uintn_t dest_offset;\r
+       unsigned src_offset, dest_offset;\r
 \r
        OSM_LOG_ENTER(sa->p_log);\r
 \r
@@ -1072,7 +1071,7 @@ static osm_mpr_item_t *mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
        uint16_t dest_lid_max_ho;\r
        uint16_t src_lid_ho;\r
        uint16_t dest_lid_ho;\r
-       uintn_t iterations;\r
+       unsigned iterations;\r
        int src_lids, dest_lids;\r
 \r
        OSM_LOG_ENTER(sa->p_log);\r
index 82a952916fa718811d267c9a74409d5f5f647432..1b81bc8cbf6e4a67ec1e2e3c81c5351c77a435e2 100644 (file)
@@ -910,9 +910,7 @@ static void pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
        uint16_t dest_lid_ho;\r
        uint32_t path_num;\r
        uint8_t preference;\r
-       uintn_t iterations;\r
-       uintn_t src_offset;\r
-       uintn_t dest_offset;\r
+       unsigned iterations, src_offset, dest_offset;\r
 \r
        OSM_LOG_ENTER(sa->p_log);\r
 \r
@@ -1026,7 +1024,7 @@ static void pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
                if (comp_mask & IB_PR_COMPMASK_NUMBPATH)\r
                        iterations = ib_path_rec_num_path(p_pr);\r
                else\r
-                       iterations = (uintn_t) (-1);\r
+                       iterations = (unsigned) (-1);\r
        else\r
                iterations = 1;\r
 \r
index a4ea38353eecad84180f1f6339525c8c7cee1c93..5b45699b559eaa2edd95ca78a35eca2ad13a87c5 100644 (file)
@@ -399,7 +399,7 @@ static const opt_rec_t opt_tbl[] = {
 \r
 /**********************************************************************\r
  **********************************************************************/\r
-static intn_t compar_mgids(const void *m1, const void *m2)\r
+static int compar_mgids(const void *m1, const void *m2)\r
 {\r
        return memcmp(m1, m2, sizeof(ib_gid_t));\r
 }\r