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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? th-lock.c

?? openssl是ssl的開源項目
?? C
字號:
/* 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 WIN32#include <windows.h>#endif#ifdef SOLARIS#include <synch.h>#include <thread.h>#endif#ifdef IRIX#include <ulocks.h>#include <sys/prctl.h>#endif#include "lhash.h"#include "crypto.h"#include "buffer.h"#include "e_os.h"#include "x509.h"#include "ssl.h"#include "err.h"#ifndef NOPROTOint 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 );#elseint CRYPOTO_thread_setup();void CRYPTO_cleanup();static void irix_locking_callback();static void solaris_locking_callback();static void win32_locking_callback();static void pthreads_locking_callback();static unsigned long irix_thread_id();static unsigned long solaris_thread_id();static unsigned long pthreads_thread_id();#endif/* usage: * CRYPTO_thread_setup(); * applicaion code * CRYPTO_thread_cleanup(); */#define THREAD_STACK_SIZE (16*1024)#ifdef WIN32static HANDLE lock_cs[CRYPTO_NUM_LOCKS];int CRYPTO_thread_setup()	{	int i;	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()	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_NUM_LOCKS; i++)		CloseHandle(lock_cs[i]);	}void win32_locking_callback(mode,type,file,line)int mode;int type;char *file;int line;	{	if (mode & CRYPTO_LOCK)		{		WaitForSingleObject(lock_cs[type],INFINITE);		}	else		{		ReleaseMutex(lock_cs[type]);		}	}#endif /* WIN32 */#ifdef SOLARIS#define USE_MUTEXstatic mutex_t lock_cs[CRYPTO_NUM_LOCKS];#ifdef USE_MUTEXstatic long lock_count[CRYPTO_NUM_LOCKS];#elsestatic rwlock_t lock_cs[CRYPTO_NUM_LOCKS];#endifvoid CRYPTO_thread_setup()	{	int i;	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()	{	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		}	}void solaris_locking_callback(mode,type,file,line)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()	{	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[CRYPTO_NUM_LOCKS];void CRYPTO_thread_setup()	{	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);	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()	{	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);		}	}void irix_locking_callback(mode,type,file,line)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()	{	unsigned long ret;	ret=(unsigned long)getpid();	return(ret);	}#endif /* IRIX *//* Linux and a few others */#ifdef PTHREADSstatic pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS];static long lock_count[CRYPTO_NUM_LOCKS];void CRYPTO_thread_setup()	{	int i;	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()	{	int i;	CRYPTO_set_locking_callback(NULL);	for (i=0; i<CRYPTO_NUM_LOCKS; i++)		{		pthread_mutex_destroy(&(lock_cs[i]));		}	}void pthreads_locking_callback(mode,type,file,line)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()	{	unsigned long ret;	ret=(unsigned long)pthread_self();	return(ret);	}#endif /* PTHREADS */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人久久久精品乱码一区二区三区| 亚洲激情六月丁香| 欧美三级电影在线看| 成人激情黄色小说| 成人免费看黄yyy456| 99久久国产综合精品麻豆| 97se亚洲国产综合自在线不卡| 成a人片国产精品| 色综合天天做天天爱| 91日韩在线专区| 欧美日韩精品二区第二页| 欧美精品亚洲二区| 久久综合丝袜日本网| 国产欧美日韩亚州综合| 国产精品久久免费看| 一区二区三区资源| 亚洲1区2区3区4区| 国产精一区二区三区| gogo大胆日本视频一区| 色狠狠色噜噜噜综合网| 欧美三区免费完整视频在线观看| 在线免费亚洲电影| 欧美岛国在线观看| 亚洲日本乱码在线观看| 三级不卡在线观看| 国产黄色精品网站| 欧美三级欧美一级| 国产午夜精品福利| 国产精品久久影院| 青青草原综合久久大伊人精品 | 国模无码大尺度一区二区三区| 国产一区二区在线观看视频| 不卡视频免费播放| 欧美日韩国产精品成人| 久久综合九色综合欧美亚洲| 亚洲欧美另类小说| 久草中文综合在线| 色综合中文字幕国产 | 91国产精品成人| 精品伦理精品一区| 一区二区三区美女视频| 国产一区二区在线免费观看| 欧美日韩在线播放一区| 国产欧美一区二区精品秋霞影院| 国产精品国模大尺度视频| 老司机精品视频导航| 色婷婷av一区二区三区软件| 精品国产乱子伦一区| 亚洲国产欧美一区二区三区丁香婷| 国产在线精品一区二区三区不卡| 欧美日韩成人综合| 中文字幕在线一区| 国产福利91精品一区二区三区| 欧美男人的天堂一二区| 亚洲免费色视频| 高清国产一区二区三区| 精品国产网站在线观看| 丝袜亚洲另类欧美综合| 欧美无乱码久久久免费午夜一区| 国产精品网站导航| 国产成人亚洲精品青草天美| 日韩一区二区免费在线电影 | 精品日韩欧美一区二区| 日韩电影在线一区二区| 欧美日韩国产高清一区二区三区| 亚洲人成人一区二区在线观看| 国产精品白丝jk黑袜喷水| 亚洲精品在线网站| 国产做a爰片久久毛片| 亚洲精品一线二线三线无人区| 蜜桃av噜噜一区二区三区小说| 欧美日韩免费高清一区色橹橹| 综合久久久久久| 色久综合一二码| 夜夜揉揉日日人人青青一国产精品| av不卡一区二区三区| 亚洲图片激情小说| 91丝袜美腿高跟国产极品老师 | 日本成人在线看| 日韩三级伦理片妻子的秘密按摩| 青椒成人免费视频| 日韩欧美一级特黄在线播放| 久久99热99| 国产天堂亚洲国产碰碰| 国产91综合网| 一区二区国产视频| 欧美狂野另类xxxxoooo| 美女视频一区在线观看| 一本色道a无线码一区v| 91福利精品视频| 欧美xxxxx裸体时装秀| 亚洲精品中文在线影院| 亚洲一区二区三区三| 日本不卡1234视频| 丁香桃色午夜亚洲一区二区三区| 国产成人在线观看| 在线影院国内精品| 国产片一区二区三区| 亚洲国产欧美在线| 国产一区二区美女诱惑| 欧美精三区欧美精三区| 99热99精品| 一区二区三区在线视频免费观看| 欧美精品一级二级| 国产成人免费网站| 久久久亚洲国产美女国产盗摄 | 欧美影视一区在线| 久久精品国产77777蜜臀| 国产精品色一区二区三区| 欧美性色综合网| 激情五月激情综合网| 亚洲美女一区二区三区| 精品少妇一区二区| 色老头久久综合| 国产美女精品人人做人人爽| 一区二区三区在线视频播放| 亚洲精品一区二区三区精华液 | 麻豆精品视频在线观看免费| 国产精品免费网站在线观看| 91超碰这里只有精品国产| 成人午夜电影小说| 久久成人免费网| 亚洲曰韩产成在线| 中文字幕在线不卡国产视频| 欧美一级一级性生活免费录像| eeuss鲁片一区二区三区| 久久精品国产99国产精品| 亚洲一区二区三区在线播放| 国产欧美一区二区精品仙草咪| 91精品国产综合久久精品麻豆| 99re这里只有精品视频首页| 国模冰冰炮一区二区| 日本不卡视频一二三区| 亚洲小少妇裸体bbw| 亚洲图片欧美激情| 亚洲欧洲美洲综合色网| 国产亚洲精品免费| 国产婷婷精品av在线| 国产91露脸合集magnet| 老司机精品视频在线| 亚洲色图制服丝袜| 国产香蕉久久精品综合网| 欧美一区二区三区在| 狠狠色综合播放一区二区| 欧美精品日韩精品| 青青草97国产精品免费观看无弹窗版 | 久久99热这里只有精品| 久久精品人人做人人爽人人| 成人一级片网址| 国产一区999| 一级中文字幕一区二区| 日韩久久精品一区| 亚洲综合久久av| 欧美一区二区三区视频免费播放| 精品欧美一区二区在线观看| 国产成人精品www牛牛影视| 狠狠色综合播放一区二区| 亚洲一二三专区| 亚洲欧美乱综合| 欧美极品aⅴ影院| 北条麻妃一区二区三区| 成人免费的视频| 国产一区二区主播在线| 国产精品亚洲综合一区在线观看| av男人天堂一区| 一本久久综合亚洲鲁鲁五月天 | 国产亚洲精品资源在线26u| 精品国产乱码久久久久久久久 | 不卡一卡二卡三乱码免费网站 | 成人av免费观看| 欧美mv和日韩mv的网站| 日韩理论片在线| 国产一区二区伦理| 欧美美女网站色| 日韩毛片一二三区| 国产一区二区视频在线| 日韩无一区二区| 亚洲高清免费一级二级三级| 91在线云播放| 国产精品私房写真福利视频| 美国av一区二区| 欧美日韩国产中文| 亚洲高清三级视频| 色婷婷激情久久| 亚洲激情六月丁香| 色乱码一区二区三区88| 国产精品久久久久四虎| 国产精品系列在线观看| 国产午夜精品久久久久久久| 开心九九激情九九欧美日韩精美视频电影| 91精品1区2区| 亚洲精品免费电影| 95精品视频在线| 亚洲六月丁香色婷婷综合久久| 国产精品自产自拍| 337p粉嫩大胆噜噜噜噜噜91av| 麻豆极品一区二区三区| www国产精品av| 国产精品一二一区| 国产精品免费人成网站|