亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? th-lock.c

?? 開(kāi)源的ssl算法openssl,版本0.9.8H
?? C
字號(hào):
/* crypto/threads/th-lock.c *//* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. *  * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to.  The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code.  The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). *  * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *    "This product includes cryptographic software written by *     Eric Young (eay@cryptsoft.com)" *    The word 'cryptographic' can be left out if the rouines from the library *    being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from  *    the apps directory (application code) you must include an acknowledgement: *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" *  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed.  i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#ifdef LINUX#include <typedefs.h>#endif#ifdef OPENSSL_SYS_WIN32#include <windows.h>#endif#ifdef SOLARIS#include <synch.h>#include <thread.h>#endif#ifdef IRIX#include <ulocks.h>#include <sys/prctl.h>#endif#ifdef PTHREADS#include <pthread.h>#endif#include <openssl/lhash.h>#include <openssl/crypto.h>#include <openssl/buffer.h>#include "../../e_os.h"#include <openssl/x509.h>#include <openssl/ssl.h>#include <openssl/err.h>void CRYPTO_thread_setup(void);void CRYPTO_thread_cleanup(void);static void irix_locking_callback(int mode,int type,char *file,int line);static void solaris_locking_callback(int mode,int type,char *file,int line);static void win32_locking_callback(int mode,int type,char *file,int line);static void pthreads_locking_callback(int mode,int type,char *file,int line);static unsigned long irix_thread_id(void );static unsigned long solaris_thread_id(void );static unsigned long pthreads_thread_id(void );/* usage: * CRYPTO_thread_setup(); * application code * CRYPTO_thread_cleanup(); */#define THREAD_STACK_SIZE (16*1024)#ifdef OPENSSL_SYS_WIN32static HANDLE *lock_cs;void CRYPTO_thread_setup(void)	{	int i;	lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE));	for (i=0; i<CRYPTO_num_locks(); i++)		{		lock_cs[i]=CreateMutex(NULL,FALSE,NULL);		}	CRYPTO_set_locking_callback((void (*)(int,int,char *,int))win32_locking_callback);	/* id callback defined */	return(1);	}static void CRYPTO_thread_cleanup(void)	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_num_locks(); i++)		CloseHandle(lock_cs[i]);	OPENSSL_free(lock_cs);	}void win32_locking_callback(int mode, int type, char *file, int line)	{	if (mode & CRYPTO_LOCK)		{		WaitForSingleObject(lock_cs[type],INFINITE);		}	else		{		ReleaseMutex(lock_cs[type]);		}	}#endif /* OPENSSL_SYS_WIN32 */#ifdef SOLARIS#define USE_MUTEX#ifdef USE_MUTEXstatic mutex_t *lock_cs;#elsestatic rwlock_t *lock_cs;#endifstatic long *lock_count;void CRYPTO_thread_setup(void)	{	int i;#ifdef USE_MUTEX	lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t));#else	lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t));#endif	lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));	for (i=0; i<CRYPTO_num_locks(); i++)		{		lock_count[i]=0;#ifdef USE_MUTEX		mutex_init(&(lock_cs[i]),USYNC_THREAD,NULL);#else		rwlock_init(&(lock_cs[i]),USYNC_THREAD,NULL);#endif		}	CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id);	CRYPTO_set_locking_callback((void (*)())solaris_locking_callback);	}void CRYPTO_thread_cleanup(void)	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_num_locks(); i++)		{#ifdef USE_MUTEX		mutex_destroy(&(lock_cs[i]));#else		rwlock_destroy(&(lock_cs[i]));#endif		}	OPENSSL_free(lock_cs);	OPENSSL_free(lock_count);	}void solaris_locking_callback(int mode, int type, char *file, int line)	{#if 0	fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",		CRYPTO_thread_id(),		(mode&CRYPTO_LOCK)?"l":"u",		(type&CRYPTO_READ)?"r":"w",file,line);#endif#if 0	if (CRYPTO_LOCK_SSL_CERT == type)		fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",			CRYPTO_thread_id(),			mode,file,line);#endif	if (mode & CRYPTO_LOCK)		{#ifdef USE_MUTEX		mutex_lock(&(lock_cs[type]));#else		if (mode & CRYPTO_READ)			rw_rdlock(&(lock_cs[type]));		else			rw_wrlock(&(lock_cs[type]));#endif		lock_count[type]++;		}	else		{#ifdef USE_MUTEX		mutex_unlock(&(lock_cs[type]));#else		rw_unlock(&(lock_cs[type]));#endif		}	}unsigned long solaris_thread_id(void)	{	unsigned long ret;	ret=(unsigned long)thr_self();	return(ret);	}#endif /* SOLARIS */#ifdef IRIX/* I don't think this works..... */static usptr_t *arena;static usema_t **lock_cs;void CRYPTO_thread_setup(void)	{	int i;	char filename[20];	strcpy(filename,"/tmp/mttest.XXXXXX");	mktemp(filename);	usconfig(CONF_STHREADIOOFF);	usconfig(CONF_STHREADMALLOCOFF);	usconfig(CONF_INITUSERS,100);	usconfig(CONF_LOCKTYPE,US_DEBUGPLUS);	arena=usinit(filename);	unlink(filename);	lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *));	for (i=0; i<CRYPTO_num_locks(); i++)		{		lock_cs[i]=usnewsema(arena,1);		}	CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id);	CRYPTO_set_locking_callback((void (*)())irix_locking_callback);	}void CRYPTO_thread_cleanup(void)	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_num_locks(); i++)		{		char buf[10];		sprintf(buf,"%2d:",i);		usdumpsema(lock_cs[i],stdout,buf);		usfreesema(lock_cs[i],arena);		}	OPENSSL_free(lock_cs);	}void irix_locking_callback(int mode, int type, char *file, int line)	{	if (mode & CRYPTO_LOCK)		{		uspsema(lock_cs[type]);		}	else		{		usvsema(lock_cs[type]);		}	}unsigned long irix_thread_id(void)	{	unsigned long ret;	ret=(unsigned long)getpid();	return(ret);	}#endif /* IRIX *//* Linux and a few others */#ifdef PTHREADSstatic pthread_mutex_t *lock_cs;static long *lock_count;void CRYPTO_thread_setup(void)	{	int i;	lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));	lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));	for (i=0; i<CRYPTO_num_locks(); i++)		{		lock_count[i]=0;		pthread_mutex_init(&(lock_cs[i]),NULL);		}	CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id);	CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback);	}void thread_cleanup(void)	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_num_locks(); i++)		{		pthread_mutex_destroy(&(lock_cs[i]));		}	OPENSSL_free(lock_cs);	OPENSSL_free(lock_count);	}void pthreads_locking_callback(int mode, int type, char *file,	     int line)      {#if 0	fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",		CRYPTO_thread_id(),		(mode&CRYPTO_LOCK)?"l":"u",		(type&CRYPTO_READ)?"r":"w",file,line);#endif#if 0	if (CRYPTO_LOCK_SSL_CERT == type)		fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",		CRYPTO_thread_id(),		mode,file,line);#endif	if (mode & CRYPTO_LOCK)		{		pthread_mutex_lock(&(lock_cs[type]));		lock_count[type]++;		}	else		{		pthread_mutex_unlock(&(lock_cs[type]));		}	}unsigned long pthreads_thread_id(void)	{	unsigned long ret;	ret=(unsigned long)pthread_self();	return(ret);	}#endif /* PTHREADS */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品日韩一区二区| 欧美日韩亚洲高清一区二区| 91九色02白丝porn| 亚洲人成网站色在线观看| 国产二区国产一区在线观看| 日韩欧美一区电影| 国模套图日韩精品一区二区| 欧美白人最猛性xxxxx69交| 精品在线视频一区| 欧美不卡一区二区| 精品亚洲成a人在线观看| 欧美白人最猛性xxxxx69交| 老汉av免费一区二区三区| 日韩一区二区精品在线观看| 日韩精品色哟哟| 日韩午夜av电影| 久久精品国产77777蜜臀| 日韩欧美综合在线| 国产一区二区三区四区五区美女 | 亚洲第一av色| 99国产精品一区| 亚洲一区二区四区蜜桃| 欧美日韩一区二区三区免费看 | 日本美女一区二区三区| 欧美日本在线一区| 另类小说图片综合网| 日韩视频在线你懂得| 国产精品中文字幕一区二区三区| 精品国产青草久久久久福利| 免费的成人av| 一区在线观看视频| 欧美三级在线播放| 国产一区二区按摩在线观看| 久久精品日韩一区二区三区| av一二三不卡影片| 一个色在线综合| 91麻豆精品久久久久蜜臀| 紧缚奴在线一区二区三区| 青青草原综合久久大伊人精品优势 | 51精品视频一区二区三区| 午夜精品福利一区二区蜜股av| 欧美三级中文字幕在线观看| 亚洲福利视频三区| 久久综合色之久久综合| 91一区二区在线| 视频在线观看国产精品| 久久精品在线免费观看| 51精品秘密在线观看| 国精产品一区一区三区mba视频| 中文av一区二区| 欧美三级在线视频| 国产精品18久久久久久久久久久久 | 国产成人综合精品三级| 国产精品人人做人人爽人人添| 91成人在线免费观看| 国产二区国产一区在线观看| 亚洲成人在线免费| 一区二区三区不卡视频在线观看| 日韩免费观看高清完整版| 久久99国产精品麻豆| 性久久久久久久久| 亚洲私人黄色宅男| 欧美福利视频一区| 91在线视频观看| 国内外成人在线| 亚洲综合一区在线| 国产欧美视频一区二区| 在线观看av不卡| 麻豆精品久久久| 午夜视频一区在线观看| 久久久精品综合| 91精品国产麻豆| 91国偷自产一区二区三区成为亚洲经典| 日韩激情视频在线观看| 洋洋成人永久网站入口| 欧美激情在线一区二区三区| 日韩视频123| 欧美日韩国产影片| 色婷婷精品大在线视频| 成人av动漫网站| 国产成人欧美日韩在线电影| 热久久久久久久| 日本怡春院一区二区| 亚洲国产一区二区a毛片| 中文字幕一区二区在线播放| 精品国产一区a| 欧美一区二区三区在线观看视频| 91视视频在线观看入口直接观看www| 国产精品123区| 激情伊人五月天久久综合| 免费高清在线视频一区·| 日韩不卡在线观看日韩不卡视频| 亚洲一区二区三区精品在线| 国产精品美女一区二区在线观看| 国产日韩精品一区| 日本一区二区免费在线| 欧美国产乱子伦| 国产精品美女www爽爽爽| 日本一区二区电影| 国产精品毛片大码女人| 国产精品久久免费看| 国产精品成人午夜| 伊人性伊人情综合网| 一区二区三区精品视频| 午夜精品视频在线观看| 视频在线观看一区| 久久成人久久爱| 国产精品91一区二区| av电影在线观看完整版一区二区 | 天天色综合成人网| 免费在线看成人av| 国产在线麻豆精品观看| 国产成人av自拍| 91视频一区二区| 欧美最猛性xxxxx直播| 欧美高清一级片在线| 精品国精品自拍自在线| 国产三级精品视频| 亚洲伦理在线免费看| 亚洲午夜久久久久| 蜜桃免费网站一区二区三区| 国产精品一二三四| 97久久精品人人澡人人爽| 在线精品视频小说1| 欧美一区二区三区小说| 欧美成人精品3d动漫h| 欧美韩国一区二区| 亚洲精品国产无天堂网2021| 水蜜桃久久夜色精品一区的特点 | 欧美大片在线观看一区二区| 26uuu精品一区二区| 亚洲欧洲av一区二区三区久久| 一区二区三区影院| 精品一区二区三区免费视频| 成人av集中营| 91精品国产综合久久久久久漫画| 久久久久久久综合日本| 亚洲精品成人a在线观看| 青青草国产成人99久久| 91在线国内视频| 日韩一级片在线播放| 中文字幕一区二区三中文字幕| 天天综合色天天| 99re8在线精品视频免费播放| 91色porny在线视频| 日韩精品专区在线影院重磅| 国产欧美一区二区在线| 亚洲丰满少妇videoshd| 国产高清一区日本| 欧美在线观看一区| 久久久蜜臀国产一区二区| 日韩精品色哟哟| 97久久久精品综合88久久| 久久久久久久一区| 天天影视涩香欲综合网 | av一本久道久久综合久久鬼色| 777午夜精品视频在线播放| 国产精品女同一区二区三区| 久久精品国产99| 欧美三级韩国三级日本三斤| 国产精品久久久久永久免费观看| 日本欧美肥老太交大片| 91影视在线播放| 亚洲国产精品黑人久久久| 久久se精品一区精品二区| 欧美日韩午夜影院| 亚洲人成小说网站色在线| 岛国av在线一区| 久久众筹精品私拍模特| 丝瓜av网站精品一区二区| 色婷婷综合激情| 欧美国产日产图区| 蜜臀精品久久久久久蜜臀| 欧洲一区二区av| 亚洲美女免费在线| 国产精品一二三四| 精品国产亚洲在线| 美腿丝袜在线亚洲一区| 欧美日免费三级在线| 一区二区三区四区不卡视频| 成人丝袜视频网| 国产亚洲综合性久久久影院| 国产精品一区二区不卡| 久久久久亚洲蜜桃| 黑人精品欧美一区二区蜜桃| 日韩欧美国产综合在线一区二区三区 | 亚洲美女电影在线| 91精彩视频在线| 亚洲一区二区三区三| 欧美日韩一级大片网址| 亚洲成精国产精品女| 欧美巨大另类极品videosbest| 香蕉久久夜色精品国产使用方法| 欧美mv和日韩mv国产网站| 91亚洲永久精品| 亚洲一二三区不卡| 欧美另类z0zxhd电影| 五月激情综合网| 国产亚洲一区二区在线观看| 成人中文字幕电影|