aboutsummaryrefslogtreecommitdiffstats
path: root/include/bls
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-08-16 05:10:20 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-08-16 05:10:20 +0800
commit88d3eeb9508b21528279d5e2b4acd10399d47193 (patch)
tree164fc3cf64f431560c4b4925472a4af1e61f8a66 /include/bls
parentad144ad2e4220dcbf678c515e4670c094413ea6d (diff)
downloaddexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar.gz
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar.bz2
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar.lz
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar.xz
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.tar.zst
dexon-bls-88d3eeb9508b21528279d5e2b4acd10399d47193.zip
blsInit is thread safe
Diffstat (limited to 'include/bls')
-rw-r--r--include/bls/bls.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h
index 2a9df84..6b4caa4 100644
--- a/include/bls/bls.h
+++ b/include/bls/bls.h
@@ -45,15 +45,17 @@ typedef struct {
/*
initialize this library
- call this once before using the other method
+ call this once before using the other functions
+ @param curve [in] enum value defined in mcl/bn.h
+ @param maxUnitSize [in] MCLBN_FP_UNIT_SIZE (fixed)
return 0 if success
- @note init() is not thread safe
+ @note blsInit() is thread safe and serialized if it is called simultaneously
+ but don't call it while using other functions.
*/
BLS_DLL_API int blsInit(int curve, int maxUnitSize);
-/*
- wait for the finish of the first call blsInit() and do nothing
-*/
-BLS_DLL_API int blsInitThreadSafe(int curve, int maxUnitSize);
+
+// not thread safe version (old blsInit)
+BLS_DLL_API int blsInitNotThreadSafe(int curve, int maxUnitSize);
BLS_DLL_API size_t blsGetOpUnitSize(void);
// return strlen(buf) if success else 0