Merge Request #11
Add locks to make some of the functions thread safe
The galois operations are not thread safe. Say there are multiple threads and one of them is initializing the gfp_array. The array will be set to be not NULL at first, but actually not complete the initialize process yet. When another thread comes in, it detects the array is finished to be initialized, but some variables and function pointers are still empty, which will cause segment fault and so on.
I know that Jerasure is not designed for multi-thread scenarios, but this will help to get it some parallel ability.