Build: Static constructors for built-in providers

Change how internal and external providers are built to fix static
build issues.  External providers are now required to export a
well known API that is invoked by the libfabric framework.  This
replaces the fi_register call that libfabric exported.

Update the build configuration to better handle building in-tree
providers as separate DLLs (for testing purposes).  When building
an in-tree provider as a separate DLL, it now needs to export
the required fi_prov_ini function.

Signed-off-by: pmmccorm <patrick.m.mccormick@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fi_trigger.3.md: fix typos and reword a sentence

Signed-off-by: Reese Faucette <rfaucett@cisco.com>
Merge pull request #400 from rfaucett/pr/mantypo

fi_trigger.3.md: fix typos and reword a sentence
Updated nroff-generated man pages
psm: calloc the size that is needed

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Merge pull request #405 from jsquyres/pr/psm-voidstar-deref

psm: calloc the size that is needed
Brought usnic_direct update-to-date

Signed-off-by: Xuyang Wang <xuywang@cisco.com>
Merge pull request #406 from xuywang/pr/usd_udpate

Brought usnic_direct update-to-date
fi_tostr: do not use thread-specific data

Take inspiration from strerror(): just declare that fi_tostr() is not
thread safe.  Do not use __thread, because it is a GCC extension (and
it's not worth using pthread function calls to make portable thread
safe data).

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
fi_tostr: ensure that fi_tostr does not overflow the buffer

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Merge pull request #402 from jsquyres/pr/fi-tostr-tsd

fi_tostr fixes
Updated nroff-generated man pages
added back declaration of usd_fill_udp_dest as it is used by usdf externally

Signed-off-by: Xuyang Wang <xuywang@cisco.com>
Merge pull request #407 from xuywang/pr/add_func_dec

added back declaration of usd_fill_udp_dest as it is used by usdf extern...
Fixed a bug to give correct iov buf length in usdf prefix_recv implementation

Signed-off-by: Xuyang Wang <xuywang@cisco.com>
Merge pull request #408 from xuywang/pr/prefix_recv

Fixed a bug to give correct iov buf length in usdf prefix_recv implement...
Makefile.am: updates on linkback scheme
Several changes:

* Change the definition of $(linkback) to link to libfabric.la in the
  build tree (i.e., let Libtool figure out what the right directory
  is)
* Move $(linkback) and other -l libraries to provider DL LIBADD lines
  -- they do not belong in LDFLAGS
* Add $(linkback) to provider DL DEPENDENCIES to guarantee that
  libfabric is built before the provider DLs (e.g., in a parallel
  build)

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Merge pull request #399 from shefty/master

Build: Static constructors for built-in providers
fabric: Rename FI_WAIT_MUT_COND to FI_WAIT_MUTEX_COND

Align name better with pthread names.
fabric: Defined fi_mut_cond structure

Define structure for use with FI_GETWAIT when a mutex-cond
pair are used as wait objects.

Signed-off-by: Jithin Jose <jithin.jose@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>