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

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

?? th-lock.c

?? Openssl 0.9.8e 最新版OpenSSL
?? 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 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产乱子精品免费女| 日韩久久久久久| 99精品热视频| 91丨九色丨尤物| 不卡免费追剧大全电视剧网站| 国产一区二区三区日韩| 精品一区二区三区久久| 国产在线精品一区二区夜色| 久久99精品久久久久久 | 成人av网站在线观看| 国产成人精品免费在线| 成人激情图片网| 不卡的av中国片| 一本色道久久综合精品竹菊| 91在线高清观看| 欧美午夜寂寞影院| 欧美一区二区免费视频| 日韩女优毛片在线| 国产午夜精品在线观看| 欧美国产精品v| 亚洲男同性视频| 亚洲伊人伊色伊影伊综合网| 午夜欧美视频在线观看 | 欧美疯狂做受xxxx富婆| 欧美群妇大交群的观看方式| 91精品国产综合久久福利软件| 欧美xxxxxxxx| 亚洲国产电影在线观看| 亚洲精品v日韩精品| 亚洲图片自拍偷拍| 蜜臀av一区二区在线免费观看| 国内精品久久久久影院色| yourporn久久国产精品| 欧美人xxxx| 国产女人水真多18毛片18精品视频 | 在线播放中文字幕一区| 日韩午夜电影在线观看| 久久久久久久久久电影| 亚洲精品久久久蜜桃| 日本不卡中文字幕| 国产91在线观看丝袜| 在线免费观看不卡av| 日韩欧美激情在线| 国产精品久久久久四虎| 亚洲综合一区二区| 国产一区二区中文字幕| 色域天天综合网| 日韩免费看的电影| 亚洲精品国产第一综合99久久 | 高清成人在线观看| 91丨porny丨户外露出| 欧美电影一区二区三区| 欧美激情一区二区三区在线| 亚洲国产一区视频| 国产馆精品极品| 欧美日韩成人在线一区| 国产精品美女久久久久av爽李琼| 亚洲一区二区三区四区五区黄 | 91一区二区三区在线观看| 日韩视频免费观看高清完整版在线观看| 国产日韩在线不卡| 午夜精品福利一区二区蜜股av| 国产成人在线视频网站| 欧美精品粉嫩高潮一区二区| 国产精品区一区二区三| 久久综合综合久久综合| 在线免费观看成人短视频| 久久精品在线观看| 裸体在线国模精品偷拍| 欧美色倩网站大全免费| 国产精品久久久久婷婷| 国产一区二区三区黄视频| 欧美蜜桃一区二区三区| 自拍偷拍亚洲欧美日韩| 国产剧情一区在线| 欧美久久久久久久久久| 亚洲麻豆国产自偷在线| 成人性视频免费网站| 精品区一区二区| 男女男精品视频网| 欧美网站大全在线观看| 亚洲欧美日韩国产另类专区| 成人国产在线观看| 国产欧美一区二区精品婷婷| 麻豆一区二区99久久久久| 欧美日韩一二三区| 亚洲国产精品一区二区www在线 | 国产精品亲子乱子伦xxxx裸| 国产美女一区二区三区| 欧美va天堂va视频va在线| 日韩激情av在线| 欧美人与禽zozo性伦| 亚洲第一电影网| 欧美性videosxxxxx| 亚洲精品国产精华液| 色偷偷成人一区二区三区91| 中文字幕日韩av资源站| 成人性生交大片免费看中文| 国产欧美日韩亚州综合| 国产成a人亚洲精| 亚洲国产成人一区二区三区| 国产成+人+日韩+欧美+亚洲| 日本一区二区三区免费乱视频| 国产精品一卡二| 欧美经典一区二区| 成人黄色小视频| 中文字幕在线一区| 91蜜桃在线观看| 一二三区精品视频| 欧美日韩国产中文| 日精品一区二区三区| 91精品国产入口| 久久福利视频一区二区| 久久综合久久综合久久| 国产激情一区二区三区四区 | 国产成人丝袜美腿| 国产精品国产自产拍高清av王其| av在线不卡网| 亚洲一区精品在线| 欧美一区二区三区白人| 久久99精品一区二区三区 | 青草av.久久免费一区| 欧美一级搡bbbb搡bbbb| 国产综合久久久久影院| 欧美极品少妇xxxxⅹ高跟鞋 | 久久毛片高清国产| 成人免费视频caoporn| 亚洲欧美日韩国产中文在线| 欧美日韩在线播| 韩国v欧美v日本v亚洲v| 中文在线资源观看网站视频免费不卡| 成人aa视频在线观看| 亚洲第一久久影院| 91麻豆精品国产| 国产激情视频一区二区三区欧美| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 91麻豆高清视频| 天堂在线一区二区| 国产视频在线观看一区二区三区| 99国产精品久| 热久久久久久久| 国产精品激情偷乱一区二区∴| 日本精品一区二区三区高清| 免费成人在线网站| 国产精品久久久久久久午夜片| 欧美日韩不卡在线| 国产精品1区2区3区在线观看| 亚洲色图欧洲色图| 精品少妇一区二区三区在线播放| thepron国产精品| 日韩国产精品久久久| 国产精品欧美一级免费| 欧美日韩成人综合在线一区二区| 国产成人综合亚洲91猫咪| 一区二区三区在线免费播放| 2020国产精品| 欧美日韩国产bt| 99久久综合国产精品| 免播放器亚洲一区| 亚洲激情自拍视频| 久久久久久免费网| 9191成人精品久久| 色综合天天综合色综合av| 国产精品一区不卡| 日本 国产 欧美色综合| 一区二区三区在线播放| 国产欧美日韩不卡免费| 欧美一级淫片007| 色网综合在线观看| 成人午夜短视频| 久久精品国产亚洲a| 亚洲二区在线视频| 国产精品久久国产精麻豆99网站| 日韩美女主播在线视频一区二区三区| 色婷婷综合久久久中文字幕| 国产精品18久久久久久久久久久久 | 色又黄又爽网站www久久| 精品一区二区三区视频在线观看| 亚洲自拍都市欧美小说| 国产精品免费av| 国产亚洲精品精华液| 日韩你懂的电影在线观看| 精品视频色一区| 欧美中文字幕亚洲一区二区va在线 | 99精品一区二区三区| 国产精品一区二区三区99| 美日韩黄色大片| 日韩中文字幕区一区有砖一区 | 蜜桃视频一区二区三区在线观看| 一区二区三区丝袜| 亚洲欧美色一区| 亚洲色大成网站www久久九九| 国产日韩欧美不卡在线| 久久免费视频色| 亚洲精品一线二线三线| 欧美大片在线观看一区二区| 91麻豆精品久久久久蜜臀| 欧美喷潮久久久xxxxx| 欧美日韩在线三级| 欧美午夜精品免费|