Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] "prefix" style guideline
From: Eugene Loh (Eugene.Loh_at_[hidden])
Date: 2009-07-08 14:17:47


In https://svn.open-mpi.org/trac/ompi/wiki/CodingStyle , there is
mention of "the prefix rule." What is this rule?

Let me ask specifically this. If I look at
https://svn.open-mpi.org/source/xref/ompi_1.3/ompi/mca/btl/sm/btl_sm_endpoint.h#46
, I see a declaration for "void btl_sm_add_pending". Should that really
have an "mca_" appended to the name? Don't worry about the
particulars. I'm about to change this code. I'm just asking about the
principles. Because this function is callable from a file other than
where it is defined, should the prefix be "mca_btl_sm_" or does
"btl_sm_" suffice?

Similarly, I see a btl_sm_pending_send_item_t type. Should that also
have mca_ appended?

Ouch, and this one: sm_fifo_t. (This one is my fault.) I assume it
should be mca_btl_sm_fifo_t, yes?

P.S. Shouldn't the "prefix rule" be explained in the "coding style"
twiki page?