xseg_initialize: Make it reentrant and thread-safe
xseg_join: Make it reentrant and thread-safe
xseg_leave: Make it reentrant and thread-safe