linux-gen: _ishm: allow memory alloc/free at global init/term
linux-gen: _ishm: allow memory alloc/free at global init/term

_ishm.c assumed that both _ishm_init_global() and _ishm_init_local()
had been run to work properly. This assumption turns out the be a problem
if _ishm is to be used as main memory allocator, as many modules
init_global functions assume the availability of the odp_reserve()
function before any init_local function is called.
Likewise, many term_global() functions assume the availability
of the odp_shm_free() function after all odp_term_local() have run.
This patch runs _ishm_init_local() in advance for the main ODP thread
and postpones the execution of_ishm_term_local() to init_global()
time for the main process, hence making the ishm_reserve()
and ishm_free() functions available at init_global/term_global time.

Signed-off-by: Christophe Milard <99616a981fa4477cda708a70f78076761c0c9f1c@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <52f3c909d51cc5d355a68a403df6906b3c1a8f83@linaro.org>
Signed-off-by: Maxim Uvarov <db4d16e02ae2d7493db430203537da8b2e34f290@linaro.org>

ravineet-singh/odp,dkrot/odp,mike-holmes-linaro/odp,mike-holmes-linaro/odp,erachmi/odp,ravineet-singh/odp,mike-holmes-linaro/odp,nmorey/odp,dkrot/odp,ravineet-singh/odp,dkrot/odp,erachmi/odp,ravineet-singh/odp,nmorey/odp,dkrot/odp,erachmi/odp,nmorey/odp,mike-holmes-linaro/odp,erachmi/odp,nmorey/odp