ylock.h
上传用户:sy_wanhua
上传日期:2013-07-25
资源大小:3048k
文件大小:0k
- /* -*- Mode: C; c-file-style: "bsd" -*- */
- #ifndef YLOCK_H
- #define YLOCK_H
- #include "yarrow.h"
- /* these functions should return:
- *
- * YARROW_OK on success
- * and YARROW_LOCKING on failure
- */
- #if defined( USE_LOCKS )
- #include "openssl/crypto.h"
- int LOCK( void ) { CRYPTO_w_lock(CRYPTO_LOCK_RAND); return (YARROW_OK); }
- int UNLOCK( void ) { CRYPTO_w_unlock(CRYPTO_LOCK_RAND); return (YARROW_OK); }
- #else
- #define LOCK() YARROW_OK
- #define UNLOCK() YARROW_OK
- #endif
- #endif /* YLOCK_H */