glusterfs/libglusterfs
Vijay Bellur 88136b53f5 libglusterfs: Avoid initializing per process globals more than once.
gfapi consumers can invoke glusters_globals_init() multiple times
through glfs_new(). This will result in re-initialization of already
inited variables and non deterministic behavior. To avoid this, a
new function gf_globals_init_once() has been added. The invocation
of this function is guarded through pthread_once(), thereby ensuring
single initialization of per process globals.

Change-Id: I0ecde02ee49e0c7379c2eb0f1c879d89774ec82f
BUG: 1184366
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/9430
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-01-28 06:06:19 -08:00
..
2009-02-18 17:36:07 +05:30