Do a gms thread specific key create and delete only once instead of doing it everytime on call of clGmsInitialize/Finalize. Wish pthread_once_init had osal support but this should be good enough as a barrier