[Pvfs2-cvs] commit by atchley in pvfs2/src/io/bmi/bmi_mx: mx.c mx.h

CVS commit program cvs at parl.clemson.edu
Thu Feb 21 15:33:10 EST 2008


Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx
In directory parlweb1:/tmp/cvs-serv30577

Modified Files:
	mx.c mx.h 
Log Message:

Modified Files:
	mx.c mx.h 
	Add static before each function
	change struct method_addr to struct bmi_method_addr where used


Index: mx.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/mx.c,v
diff -p -u -r1.14 -r1.15
--- mx.c	21 Feb 2008 19:03:10 -0000	1.14
+++ mx.c	21 Feb 2008 20:33:10 -0000	1.15
@@ -37,7 +37,7 @@ bmx_peer_connect(struct bmx_peer *peer);
 
 /**** TX/RX handling functions **************************************/
 
-void
+static void
 bmx_ctx_free(struct bmx_ctx *ctx)
 {
         if (ctx == NULL) return;
@@ -60,7 +60,7 @@ bmx_ctx_free(struct bmx_ctx *ctx)
         return;
 }
 
-int
+static int
 bmx_ctx_alloc(struct bmx_ctx **ctxp, enum bmx_req_type type)
 {
         struct bmx_ctx *ctx     = NULL;
@@ -142,7 +142,7 @@ bmx_ctx_alloc(struct bmx_ctx **ctxp, enu
         return 0;
 }
 
-void
+static void
 bmx_ctx_init(struct bmx_ctx *ctx)
 {
         struct bmx_peer *peer   = NULL;
@@ -191,7 +191,7 @@ bmx_ctx_init(struct bmx_ctx *ctx)
 }
 
 /* add to peer's queued txs/rxs list */
-void
+static void
 bmx_q_ctx(struct bmx_ctx *ctx)
 {
         struct bmx_peer *peer = ctx->mxc_peer;
@@ -206,7 +206,7 @@ bmx_q_ctx(struct bmx_ctx *ctx)
 }
 
 /* remove from peer's queued txs/rxs list */
-void
+static void
 bmx_deq_ctx(struct bmx_ctx *ctx)
 {
         struct bmx_peer *peer = ctx->mxc_peer;
@@ -220,7 +220,7 @@ bmx_deq_ctx(struct bmx_ctx *ctx)
 }
 
 /* add to peer's pending rxs list */
-void
+static void
 bmx_q_pending_ctx(struct bmx_ctx *ctx)
 {
         struct bmx_peer *peer = ctx->mxc_peer;
@@ -237,7 +237,7 @@ bmx_q_pending_ctx(struct bmx_ctx *ctx)
 }
 
 /* remove from peer's pending rxs list */
-void
+static void
 bmx_deq_pending_ctx(struct bmx_ctx *ctx)
 {
         struct bmx_peer *peer = ctx->mxc_peer;
@@ -256,7 +256,7 @@ bmx_deq_pending_ctx(struct bmx_ctx *ctx)
 }
 
 /* add to the global canceled list */
-void
+static void
 bmx_q_canceled_ctx(struct bmx_ctx *ctx, bmi_error_code_t error)
 {
         ctx->mxc_state = BMX_CTX_CANCELED;
@@ -270,7 +270,7 @@ bmx_q_canceled_ctx(struct bmx_ctx *ctx, 
         return;
 }
 
-struct bmx_ctx *
+static struct bmx_ctx *
 bmx_get_idle_rx(void)
 {
         struct bmx_ctx  *rx     = NULL;
@@ -301,7 +301,7 @@ bmx_get_idle_rx(void)
         return rx;
 }
 
-void
+static void
 bmx_put_idle_rx(struct bmx_ctx *rx)
 {
         if (rx == NULL) {
@@ -326,7 +326,7 @@ bmx_put_idle_rx(struct bmx_ctx *rx)
         return;
 }
 
-void
+static void
 bmx_reduce_idle_rxs(int count)
 {
         int              i      = 0;
@@ -342,7 +342,7 @@ bmx_reduce_idle_rxs(int count)
         return;
 }
 
-struct bmx_ctx *
+static struct bmx_ctx *
 bmx_get_idle_tx(void)
 {
         struct bmx_ctx  *tx     = NULL;
@@ -373,7 +373,7 @@ bmx_get_idle_tx(void)
         return tx;
 }
 
-void
+static void
 bmx_put_idle_tx(struct bmx_ctx *tx)
 {
         if (tx == NULL) {
@@ -400,7 +400,7 @@ bmx_put_idle_tx(struct bmx_ctx *tx)
 
 /**** peername parsing functions **************************************/
 
-int
+static int
 bmx_verify_hostname(char *host)
 {
         int             ret     = 0;
@@ -423,7 +423,7 @@ bmx_verify_hostname(char *host)
         return 0;
 }
 
-int
+static int
 bmx_verify_num_str(char *num_str)
 {
         int             ret     = 0;
@@ -447,7 +447,7 @@ bmx_verify_num_str(char *num_str)
  * returns 0 and we do not know that it failed. 
  * This handles legal hostnames (1-63 chars) include a-zA-Z0-9 as well as . and -
  * It will accept IPv4 addresses but not IPv6 (too many semicolons) */
-int
+static int
 bmx_parse_peername(const char *peername, char **hostname, uint32_t *board, uint32_t *ep_id)
 {
         int             ret             = 0;
@@ -564,7 +564,7 @@ bmx_parse_peername(const char *peername,
 
 /**** peer handling functions **************************************/
 
-void
+static void
 bmx_peer_free(struct bmx_peer *peer)
 {
         struct bmx_method_addr *mxmap = peer->mxp_mxmap;
@@ -586,7 +586,7 @@ bmx_peer_free(struct bmx_peer *peer)
         return;
 }
 
-void
+static void
 bmx_peer_addref(struct bmx_peer *peer)
 {
         gen_mutex_lock(&peer->mxp_lock);
@@ -596,7 +596,7 @@ bmx_peer_addref(struct bmx_peer *peer)
         return;
 }
 
-void
+static void
 bmx_peer_decref(struct bmx_peer *peer)
 {
         debug(BMX_DB_FUNC, "entering %s", __func__);
@@ -629,7 +629,7 @@ bmx_peer_decref(struct bmx_peer *peer)
         return;
 }
 
-int
+static int
 bmx_peer_alloc(struct bmx_peer **peerp, struct bmx_method_addr *mxmap)
 {
         int              i              = 0;
@@ -712,7 +712,7 @@ bmx_peer_alloc(struct bmx_peer **peerp, 
         return 0;
 }
 
-int
+static int
 bmx_peer_init_state(struct bmx_peer *peer)
 {
         int             ret     = 0;
@@ -743,7 +743,7 @@ bmx_peer_init_state(struct bmx_peer *pee
 /**** startup/shutdown functions **************************************/
 
 /* init bmi_mx */
-int
+static int
 bmx_globals_init(int method_id)
 {
 #if BMX_MEM_ACCT
@@ -797,7 +797,7 @@ bmx_globals_init(int method_id)
 }
 
 
-int
+static int
 bmx_open_endpoint(mx_endpoint_t *ep, uint32_t board, uint32_t ep_id)
 {
         mx_return_t     mxret   = MX_SUCCESS;
@@ -850,6 +850,8 @@ BMI_mx_initialize(bmi_method_addr_p list
         int             ret     = 0;
         mx_return_t     mxret   = MX_SUCCESS;
 
+        debug(BMX_DB_FUNC, "entering %s", __func__);
+
 #if BMX_LOGGING
         MPE_Init_log();
 #define BMX_LOG_STATE 1
@@ -958,6 +960,8 @@ BMI_mx_initialize(bmi_method_addr_p list
 #if BMX_MEM_ACCT
         debug(BMX_DB_MEM, "memory used at end of initialization %lld", llu(mem_used));
 #endif
+        debug(BMX_DB_FUNC, "leaving %s", __func__);
+
         return 0;
 }
 
@@ -1177,7 +1181,7 @@ BMI_mx_get_info(int option, void *inout_
 #define BMX_IO_BUF      1
 #define BMX_UNEX_BUF    2
 
-void *
+static void *
 bmx_memalloc(bmi_size_t size, int type)
 {
         void                    *buf    = NULL;
@@ -1308,7 +1312,7 @@ BMI_mx_unexpected_free(void *buf)
         return 0;
 }
 
-void
+static void
 bmx_parse_match(uint64_t match, uint8_t *type, uint32_t *id, uint32_t *tag)
 {
         *type   = (uint8_t)  (match >> 60);
@@ -1317,7 +1321,7 @@ bmx_parse_match(uint64_t match, uint8_t 
         return;
 }
 
-void
+static void
 bmx_create_match(struct bmx_ctx *ctx)
 {
         int             connect = 0;
@@ -1353,7 +1357,7 @@ bmx_create_match(struct bmx_ctx *ctx)
         return;
 }
 
-bmi_error_code_t
+static bmi_error_code_t
 bmx_mx_to_bmi_errno(enum mx_status_code code)
 {
         int     err     = 0;

Index: mx.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/mx.h,v
diff -p -u -r1.7 -r1.8
--- mx.h	21 Feb 2008 19:03:10 -0000	1.7
+++ mx.h	21 Feb 2008 20:33:10 -0000	1.8
@@ -192,17 +192,17 @@ enum bmx_peer_state {
 
 struct bmx_method_addr
 {
-        struct method_addr *mxm_map;        /* peer's method_addr */
-        const char         *mxm_peername;   /* mx://hostname/board/ep_id  */
-        const char         *mxm_hostname;   /* peer's hostname */
-        uint32_t            mxm_board;      /* peer's MX board index */
-        uint32_t            mxm_ep_id;      /* peer's MX endpoint ID */
-        struct bmx_peer    *mxm_peer;       /* peer pointer */
+        struct bmi_method_addr  *mxm_map;        /* peer's bmi_method_addrt */
+        const char              *mxm_peername;   /* mx://hostname/board/ep_id  */
+        const char              *mxm_hostname;   /* peer's hostname */
+        uint32_t                 mxm_board;      /* peer's MX board index */
+        uint32_t                 mxm_ep_id;      /* peer's MX endpoint ID */
+        struct bmx_peer         *mxm_peer;       /* peer pointer */
 };
 
 struct bmx_peer
 {
-        struct method_addr     *mxp_map;        /* his method_addr * */
+        struct bmi_method_addr *mxp_map;        /* his bmi_method_addr * */
         struct bmx_method_addr *mxp_mxmap;      /* his bmx_method_addr */
         uint64_t                mxp_nic_id;     /* his NIC id */
         mx_endpoint_addr_t      mxp_epa;        /* his MX endpoint address */



More information about the Pvfs2-cvs mailing list