diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/threads | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/threads')
-rw-r--r-- | src/lib/libcrypto/threads/mttest.c | 119 | ||||
-rw-r--r-- | src/lib/libcrypto/threads/th-lock.c | 79 |
2 files changed, 57 insertions, 141 deletions
diff --git a/src/lib/libcrypto/threads/mttest.c b/src/lib/libcrypto/threads/mttest.c index be395f2bc4..142623edda 100644 --- a/src/lib/libcrypto/threads/mttest.c +++ b/src/lib/libcrypto/threads/mttest.c | |||
@@ -74,13 +74,13 @@ | |||
74 | #include <ulocks.h> | 74 | #include <ulocks.h> |
75 | #include <sys/prctl.h> | 75 | #include <sys/prctl.h> |
76 | #endif | 76 | #endif |
77 | #include "lhash.h" | 77 | #include <openssl/lhash.h> |
78 | #include "crypto.h" | 78 | #include <openssl/crypto.h> |
79 | #include "buffer.h" | 79 | #include <openssl/buffer.h> |
80 | #include "../e_os.h" | 80 | #include "../e_os.h" |
81 | #include "x509.h" | 81 | #include <openssl/x509.h> |
82 | #include "ssl.h" | 82 | #include <openssl/ssl.h> |
83 | #include "err.h" | 83 | #include <openssl/err.h> |
84 | 84 | ||
85 | #ifdef NO_FP_API | 85 | #ifdef NO_FP_API |
86 | #define APPS_WIN16 | 86 | #define APPS_WIN16 |
@@ -92,7 +92,6 @@ | |||
92 | 92 | ||
93 | #define MAX_THREAD_NUMBER 100 | 93 | #define MAX_THREAD_NUMBER 100 |
94 | 94 | ||
95 | #ifndef NOPROTO | ||
96 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, | 95 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, |
97 | int error,char *arg); | 96 | int error,char *arg); |
98 | void thread_setup(void); | 97 | void thread_setup(void); |
@@ -108,23 +107,6 @@ unsigned long irix_thread_id(void ); | |||
108 | unsigned long solaris_thread_id(void ); | 107 | unsigned long solaris_thread_id(void ); |
109 | unsigned long pthreads_thread_id(void ); | 108 | unsigned long pthreads_thread_id(void ); |
110 | 109 | ||
111 | #else | ||
112 | int MS_CALLBACK verify_callback(); | ||
113 | void thread_setup(); | ||
114 | void thread_cleanup(); | ||
115 | void do_threads(); | ||
116 | |||
117 | void irix_locking_callback(); | ||
118 | void solaris_locking_callback(); | ||
119 | void win32_locking_callback(); | ||
120 | void pthreads_locking_callback(); | ||
121 | |||
122 | unsigned long irix_thread_id(); | ||
123 | unsigned long solaris_thread_id(); | ||
124 | unsigned long pthreads_thread_id(); | ||
125 | |||
126 | #endif | ||
127 | |||
128 | BIO *bio_err=NULL; | 110 | BIO *bio_err=NULL; |
129 | BIO *bio_stdout=NULL; | 111 | BIO *bio_stdout=NULL; |
130 | 112 | ||
@@ -139,15 +121,8 @@ int number_of_loops=10; | |||
139 | int reconnect=0; | 121 | int reconnect=0; |
140 | int cache_stats=0; | 122 | int cache_stats=0; |
141 | 123 | ||
142 | #ifndef NOPROTO | ||
143 | int doit(char *ctx[4]); | 124 | int doit(char *ctx[4]); |
144 | #else | 125 | static void print_stats(FILE *fp, SSL_CTX *ctx) |
145 | int doit(); | ||
146 | #endif | ||
147 | |||
148 | static void print_stats(fp,ctx) | ||
149 | FILE *fp; | ||
150 | SSL_CTX *ctx; | ||
151 | { | 126 | { |
152 | fprintf(fp,"%4ld items in the session cache\n", | 127 | fprintf(fp,"%4ld items in the session cache\n", |
153 | SSL_CTX_sess_number(ctx)); | 128 | SSL_CTX_sess_number(ctx)); |
@@ -164,7 +139,7 @@ SSL_CTX *ctx; | |||
164 | fprintf(fp,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ctx)); | 139 | fprintf(fp,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ctx)); |
165 | } | 140 | } |
166 | 141 | ||
167 | static void sv_usage() | 142 | static void sv_usage(void) |
168 | { | 143 | { |
169 | fprintf(stderr,"usage: ssltest [args ...]\n"); | 144 | fprintf(stderr,"usage: ssltest [args ...]\n"); |
170 | fprintf(stderr,"\n"); | 145 | fprintf(stderr,"\n"); |
@@ -182,9 +157,7 @@ static void sv_usage() | |||
182 | fprintf(stderr," -ssl3 - just SSLv3n\n"); | 157 | fprintf(stderr," -ssl3 - just SSLv3n\n"); |
183 | } | 158 | } |
184 | 159 | ||
185 | int main(argc, argv) | 160 | int main(int argc, char *argv[]) |
186 | int argc; | ||
187 | char *argv[]; | ||
188 | { | 161 | { |
189 | char *CApath=NULL,*CAfile=NULL; | 162 | char *CApath=NULL,*CAfile=NULL; |
190 | int badop=0; | 163 | int badop=0; |
@@ -358,8 +331,7 @@ end: | |||
358 | #define C_DONE 1 | 331 | #define C_DONE 1 |
359 | #define S_DONE 2 | 332 | #define S_DONE 2 |
360 | 333 | ||
361 | int ndoit(ssl_ctx) | 334 | int ndoit(SSL_CTX *ssl_ctx[2]) |
362 | SSL_CTX *ssl_ctx[2]; | ||
363 | { | 335 | { |
364 | int i; | 336 | int i; |
365 | int ret; | 337 | int ret; |
@@ -405,8 +377,7 @@ SSL_CTX *ssl_ctx[2]; | |||
405 | return(0); | 377 | return(0); |
406 | } | 378 | } |
407 | 379 | ||
408 | int doit(ctx) | 380 | int doit(char *ctx[4]) |
409 | char *ctx[4]; | ||
410 | { | 381 | { |
411 | SSL_CTX *s_ctx,*c_ctx; | 382 | SSL_CTX *s_ctx,*c_ctx; |
412 | static char cbuf[200],sbuf[200]; | 383 | static char cbuf[200],sbuf[200]; |
@@ -681,13 +652,8 @@ err: | |||
681 | return(0); | 652 | return(0); |
682 | } | 653 | } |
683 | 654 | ||
684 | int MS_CALLBACK verify_callback(ok, xs, xi, depth, error, arg) | 655 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, |
685 | int ok; | 656 | int error, char *arg) |
686 | X509 *xs; | ||
687 | X509 *xi; | ||
688 | int depth; | ||
689 | int error; | ||
690 | char *arg; | ||
691 | { | 657 | { |
692 | char buf[256]; | 658 | char buf[256]; |
693 | 659 | ||
@@ -708,7 +674,7 @@ char *arg; | |||
708 | 674 | ||
709 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; | 675 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; |
710 | 676 | ||
711 | void thread_setup() | 677 | void thread_setup(void) |
712 | { | 678 | { |
713 | int i; | 679 | int i; |
714 | 680 | ||
@@ -721,7 +687,7 @@ void thread_setup() | |||
721 | /* id callback defined */ | 687 | /* id callback defined */ |
722 | } | 688 | } |
723 | 689 | ||
724 | void thread_cleanup() | 690 | void thread_cleanup(void) |
725 | { | 691 | { |
726 | int i; | 692 | int i; |
727 | 693 | ||
@@ -730,11 +696,7 @@ void thread_cleanup() | |||
730 | CloseHandle(lock_cs[i]); | 696 | CloseHandle(lock_cs[i]); |
731 | } | 697 | } |
732 | 698 | ||
733 | void win32_locking_callback(mode,type,file,line) | 699 | void win32_locking_callback(int mode, int type, char *file, int line) |
734 | int mode; | ||
735 | int type; | ||
736 | char *file; | ||
737 | int line; | ||
738 | { | 700 | { |
739 | if (mode & CRYPTO_LOCK) | 701 | if (mode & CRYPTO_LOCK) |
740 | { | 702 | { |
@@ -746,8 +708,7 @@ int line; | |||
746 | } | 708 | } |
747 | } | 709 | } |
748 | 710 | ||
749 | void do_threads(s_ctx,c_ctx) | 711 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
750 | SSL_CTX *s_ctx,*c_ctx; | ||
751 | { | 712 | { |
752 | double ret; | 713 | double ret; |
753 | SSL_CTX *ssl_ctx[2]; | 714 | SSL_CTX *ssl_ctx[2]; |
@@ -806,7 +767,7 @@ static mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | |||
806 | /*static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; */ | 767 | /*static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; */ |
807 | static long lock_count[CRYPTO_NUM_LOCKS]; | 768 | static long lock_count[CRYPTO_NUM_LOCKS]; |
808 | 769 | ||
809 | void thread_setup() | 770 | void thread_setup(void) |
810 | { | 771 | { |
811 | int i; | 772 | int i; |
812 | 773 | ||
@@ -821,7 +782,7 @@ void thread_setup() | |||
821 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | 782 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); |
822 | } | 783 | } |
823 | 784 | ||
824 | void thread_cleanup() | 785 | void thread_cleanup(void) |
825 | { | 786 | { |
826 | int i; | 787 | int i; |
827 | 788 | ||
@@ -836,11 +797,7 @@ fprintf(stderr,"cleanup\n"); | |||
836 | fprintf(stderr,"done cleanup\n"); | 797 | fprintf(stderr,"done cleanup\n"); |
837 | } | 798 | } |
838 | 799 | ||
839 | void solaris_locking_callback(mode,type,file,line) | 800 | void solaris_locking_callback(int mode, int type, char *file, int line) |
840 | int mode; | ||
841 | int type; | ||
842 | char *file; | ||
843 | int line; | ||
844 | { | 801 | { |
845 | #ifdef undef | 802 | #ifdef undef |
846 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 803 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -872,8 +829,7 @@ if (CRYPTO_LOCK_SSL_CERT == type) | |||
872 | } | 829 | } |
873 | } | 830 | } |
874 | 831 | ||
875 | void do_threads(s_ctx,c_ctx) | 832 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
876 | SSL_CTX *s_ctx,*c_ctx; | ||
877 | { | 833 | { |
878 | SSL_CTX *ssl_ctx[2]; | 834 | SSL_CTX *ssl_ctx[2]; |
879 | thread_t thread_ctx[MAX_THREAD_NUMBER]; | 835 | thread_t thread_ctx[MAX_THREAD_NUMBER]; |
@@ -902,7 +858,7 @@ SSL_CTX *s_ctx,*c_ctx; | |||
902 | s_ctx->references,c_ctx->references); | 858 | s_ctx->references,c_ctx->references); |
903 | } | 859 | } |
904 | 860 | ||
905 | unsigned long solaris_thread_id() | 861 | unsigned long solaris_thread_id(void) |
906 | { | 862 | { |
907 | unsigned long ret; | 863 | unsigned long ret; |
908 | 864 | ||
@@ -917,7 +873,7 @@ unsigned long solaris_thread_id() | |||
917 | static usptr_t *arena; | 873 | static usptr_t *arena; |
918 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; | 874 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; |
919 | 875 | ||
920 | void thread_setup() | 876 | void thread_setup(void) |
921 | { | 877 | { |
922 | int i; | 878 | int i; |
923 | char filename[20]; | 879 | char filename[20]; |
@@ -941,7 +897,7 @@ void thread_setup() | |||
941 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); | 897 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); |
942 | } | 898 | } |
943 | 899 | ||
944 | void thread_cleanup() | 900 | void thread_cleanup(void) |
945 | { | 901 | { |
946 | int i; | 902 | int i; |
947 | 903 | ||
@@ -956,11 +912,7 @@ void thread_cleanup() | |||
956 | } | 912 | } |
957 | } | 913 | } |
958 | 914 | ||
959 | void irix_locking_callback(mode,type,file,line) | 915 | void irix_locking_callback(int mode, int type, char *file, int line) |
960 | int mode; | ||
961 | int type; | ||
962 | char *file; | ||
963 | int line; | ||
964 | { | 916 | { |
965 | if (mode & CRYPTO_LOCK) | 917 | if (mode & CRYPTO_LOCK) |
966 | { | 918 | { |
@@ -974,8 +926,7 @@ int line; | |||
974 | } | 926 | } |
975 | } | 927 | } |
976 | 928 | ||
977 | void do_threads(s_ctx,c_ctx) | 929 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
978 | SSL_CTX *s_ctx,*c_ctx; | ||
979 | { | 930 | { |
980 | SSL_CTX *ssl_ctx[2]; | 931 | SSL_CTX *ssl_ctx[2]; |
981 | int thread_ctx[MAX_THREAD_NUMBER]; | 932 | int thread_ctx[MAX_THREAD_NUMBER]; |
@@ -1000,7 +951,7 @@ SSL_CTX *s_ctx,*c_ctx; | |||
1000 | s_ctx->references,c_ctx->references); | 951 | s_ctx->references,c_ctx->references); |
1001 | } | 952 | } |
1002 | 953 | ||
1003 | unsigned long irix_thread_id() | 954 | unsigned long irix_thread_id(void) |
1004 | { | 955 | { |
1005 | unsigned long ret; | 956 | unsigned long ret; |
1006 | 957 | ||
@@ -1014,7 +965,7 @@ unsigned long irix_thread_id() | |||
1014 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | 965 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; |
1015 | static long lock_count[CRYPTO_NUM_LOCKS]; | 966 | static long lock_count[CRYPTO_NUM_LOCKS]; |
1016 | 967 | ||
1017 | void thread_setup() | 968 | void thread_setup(void) |
1018 | { | 969 | { |
1019 | int i; | 970 | int i; |
1020 | 971 | ||
@@ -1028,7 +979,7 @@ void thread_setup() | |||
1028 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); | 979 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); |
1029 | } | 980 | } |
1030 | 981 | ||
1031 | void thread_cleanup() | 982 | void thread_cleanup(void) |
1032 | { | 983 | { |
1033 | int i; | 984 | int i; |
1034 | 985 | ||
@@ -1043,11 +994,8 @@ void thread_cleanup() | |||
1043 | fprintf(stderr,"done cleanup\n"); | 994 | fprintf(stderr,"done cleanup\n"); |
1044 | } | 995 | } |
1045 | 996 | ||
1046 | void pthreads_locking_callback(mode,type,file,line) | 997 | void pthreads_locking_callback(int mode, int type, char *file, |
1047 | int mode; | 998 | int line) |
1048 | int type; | ||
1049 | char *file; | ||
1050 | int line; | ||
1051 | { | 999 | { |
1052 | #ifdef undef | 1000 | #ifdef undef |
1053 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 1001 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -1072,8 +1020,7 @@ int line; | |||
1072 | } | 1020 | } |
1073 | } | 1021 | } |
1074 | 1022 | ||
1075 | void do_threads(s_ctx,c_ctx) | 1023 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
1076 | SSL_CTX *s_ctx,*c_ctx; | ||
1077 | { | 1024 | { |
1078 | SSL_CTX *ssl_ctx[2]; | 1025 | SSL_CTX *ssl_ctx[2]; |
1079 | pthread_t thread_ctx[MAX_THREAD_NUMBER]; | 1026 | pthread_t thread_ctx[MAX_THREAD_NUMBER]; |
@@ -1101,7 +1048,7 @@ SSL_CTX *s_ctx,*c_ctx; | |||
1101 | s_ctx->references,c_ctx->references); | 1048 | s_ctx->references,c_ctx->references); |
1102 | } | 1049 | } |
1103 | 1050 | ||
1104 | unsigned long pthreads_thread_id() | 1051 | unsigned long pthreads_thread_id(void) |
1105 | { | 1052 | { |
1106 | unsigned long ret; | 1053 | unsigned long ret; |
1107 | 1054 | ||
diff --git a/src/lib/libcrypto/threads/th-lock.c b/src/lib/libcrypto/threads/th-lock.c index 039022446d..afb4f4caf2 100644 --- a/src/lib/libcrypto/threads/th-lock.c +++ b/src/lib/libcrypto/threads/th-lock.c | |||
@@ -74,15 +74,14 @@ | |||
74 | #include <ulocks.h> | 74 | #include <ulocks.h> |
75 | #include <sys/prctl.h> | 75 | #include <sys/prctl.h> |
76 | #endif | 76 | #endif |
77 | #include "lhash.h" | 77 | #include <openssl/lhash.h> |
78 | #include "crypto.h" | 78 | #include <openssl/crypto.h> |
79 | #include "buffer.h" | 79 | #include <openssl/buffer.h> |
80 | #include "e_os.h" | 80 | #include <openssl/e_os.h> |
81 | #include "x509.h" | 81 | #include <openssl/x509.h> |
82 | #include "ssl.h" | 82 | #include <openssl/ssl.h> |
83 | #include "err.h" | 83 | #include <openssl/err.h> |
84 | 84 | ||
85 | #ifndef NOPROTO | ||
86 | int CRYPTO_thread_setup(void); | 85 | int CRYPTO_thread_setup(void); |
87 | void CRYPTO_thread_cleanup(void); | 86 | void CRYPTO_thread_cleanup(void); |
88 | 87 | ||
@@ -95,21 +94,6 @@ static unsigned long irix_thread_id(void ); | |||
95 | static unsigned long solaris_thread_id(void ); | 94 | static unsigned long solaris_thread_id(void ); |
96 | static unsigned long pthreads_thread_id(void ); | 95 | static unsigned long pthreads_thread_id(void ); |
97 | 96 | ||
98 | #else | ||
99 | int CRYPOTO_thread_setup(); | ||
100 | void CRYPTO_cleanup(); | ||
101 | |||
102 | static void irix_locking_callback(); | ||
103 | static void solaris_locking_callback(); | ||
104 | static void win32_locking_callback(); | ||
105 | static void pthreads_locking_callback(); | ||
106 | |||
107 | static unsigned long irix_thread_id(); | ||
108 | static unsigned long solaris_thread_id(); | ||
109 | static unsigned long pthreads_thread_id(); | ||
110 | |||
111 | #endif | ||
112 | |||
113 | /* usage: | 97 | /* usage: |
114 | * CRYPTO_thread_setup(); | 98 | * CRYPTO_thread_setup(); |
115 | * applicaion code | 99 | * applicaion code |
@@ -122,7 +106,7 @@ static unsigned long pthreads_thread_id(); | |||
122 | 106 | ||
123 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; | 107 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; |
124 | 108 | ||
125 | int CRYPTO_thread_setup() | 109 | int CRYPTO_thread_setup(void) |
126 | { | 110 | { |
127 | int i; | 111 | int i; |
128 | 112 | ||
@@ -136,7 +120,7 @@ int CRYPTO_thread_setup() | |||
136 | return(1); | 120 | return(1); |
137 | } | 121 | } |
138 | 122 | ||
139 | static void CRYPTO_thread_cleanup() | 123 | static void CRYPTO_thread_cleanup(void) |
140 | { | 124 | { |
141 | int i; | 125 | int i; |
142 | 126 | ||
@@ -145,11 +129,7 @@ static void CRYPTO_thread_cleanup() | |||
145 | CloseHandle(lock_cs[i]); | 129 | CloseHandle(lock_cs[i]); |
146 | } | 130 | } |
147 | 131 | ||
148 | void win32_locking_callback(mode,type,file,line) | 132 | void win32_locking_callback(int mode, int type, char *file, int line) |
149 | int mode; | ||
150 | int type; | ||
151 | char *file; | ||
152 | int line; | ||
153 | { | 133 | { |
154 | if (mode & CRYPTO_LOCK) | 134 | if (mode & CRYPTO_LOCK) |
155 | { | 135 | { |
@@ -174,7 +154,7 @@ static long lock_count[CRYPTO_NUM_LOCKS]; | |||
174 | static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; | 154 | static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; |
175 | #endif | 155 | #endif |
176 | 156 | ||
177 | void CRYPTO_thread_setup() | 157 | void CRYPTO_thread_setup(void) |
178 | { | 158 | { |
179 | int i; | 159 | int i; |
180 | 160 | ||
@@ -192,7 +172,7 @@ void CRYPTO_thread_setup() | |||
192 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | 172 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); |
193 | } | 173 | } |
194 | 174 | ||
195 | void CRYPTO_thread_cleanup() | 175 | void CRYPTO_thread_cleanup(void) |
196 | { | 176 | { |
197 | int i; | 177 | int i; |
198 | 178 | ||
@@ -207,11 +187,7 @@ void CRYPTO_thread_cleanup() | |||
207 | } | 187 | } |
208 | } | 188 | } |
209 | 189 | ||
210 | void solaris_locking_callback(mode,type,file,line) | 190 | void solaris_locking_callback(int mode, int type, char *file, int line) |
211 | int mode; | ||
212 | int type; | ||
213 | char *file; | ||
214 | int line; | ||
215 | { | 191 | { |
216 | #if 0 | 192 | #if 0 |
217 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 193 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -248,7 +224,7 @@ int line; | |||
248 | } | 224 | } |
249 | } | 225 | } |
250 | 226 | ||
251 | unsigned long solaris_thread_id() | 227 | unsigned long solaris_thread_id(void) |
252 | { | 228 | { |
253 | unsigned long ret; | 229 | unsigned long ret; |
254 | 230 | ||
@@ -263,7 +239,7 @@ unsigned long solaris_thread_id() | |||
263 | static usptr_t *arena; | 239 | static usptr_t *arena; |
264 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; | 240 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; |
265 | 241 | ||
266 | void CRYPTO_thread_setup() | 242 | void CRYPTO_thread_setup(void) |
267 | { | 243 | { |
268 | int i; | 244 | int i; |
269 | char filename[20]; | 245 | char filename[20]; |
@@ -287,7 +263,7 @@ void CRYPTO_thread_setup() | |||
287 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); | 263 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); |
288 | } | 264 | } |
289 | 265 | ||
290 | void CRYPTO_thread_cleanup() | 266 | void CRYPTO_thread_cleanup(void) |
291 | { | 267 | { |
292 | int i; | 268 | int i; |
293 | 269 | ||
@@ -302,11 +278,7 @@ void CRYPTO_thread_cleanup() | |||
302 | } | 278 | } |
303 | } | 279 | } |
304 | 280 | ||
305 | void irix_locking_callback(mode,type,file,line) | 281 | void irix_locking_callback(int mode, int type, char *file, int line) |
306 | int mode; | ||
307 | int type; | ||
308 | char *file; | ||
309 | int line; | ||
310 | { | 282 | { |
311 | if (mode & CRYPTO_LOCK) | 283 | if (mode & CRYPTO_LOCK) |
312 | { | 284 | { |
@@ -318,7 +290,7 @@ int line; | |||
318 | } | 290 | } |
319 | } | 291 | } |
320 | 292 | ||
321 | unsigned long irix_thread_id() | 293 | unsigned long irix_thread_id(void) |
322 | { | 294 | { |
323 | unsigned long ret; | 295 | unsigned long ret; |
324 | 296 | ||
@@ -333,7 +305,7 @@ unsigned long irix_thread_id() | |||
333 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | 305 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; |
334 | static long lock_count[CRYPTO_NUM_LOCKS]; | 306 | static long lock_count[CRYPTO_NUM_LOCKS]; |
335 | 307 | ||
336 | void CRYPTO_thread_setup() | 308 | void CRYPTO_thread_setup(void) |
337 | { | 309 | { |
338 | int i; | 310 | int i; |
339 | 311 | ||
@@ -347,7 +319,7 @@ void CRYPTO_thread_setup() | |||
347 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); | 319 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); |
348 | } | 320 | } |
349 | 321 | ||
350 | void thread_cleanup() | 322 | void thread_cleanup(void) |
351 | { | 323 | { |
352 | int i; | 324 | int i; |
353 | 325 | ||
@@ -358,11 +330,8 @@ void thread_cleanup() | |||
358 | } | 330 | } |
359 | } | 331 | } |
360 | 332 | ||
361 | void pthreads_locking_callback(mode,type,file,line) | 333 | void pthreads_locking_callback(int mode, int type, char *file, |
362 | int mode; | 334 | int line) |
363 | int type; | ||
364 | char *file; | ||
365 | int line; | ||
366 | { | 335 | { |
367 | #if 0 | 336 | #if 0 |
368 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 337 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -387,7 +356,7 @@ int line; | |||
387 | } | 356 | } |
388 | } | 357 | } |
389 | 358 | ||
390 | unsigned long pthreads_thread_id() | 359 | unsigned long pthreads_thread_id(void) |
391 | { | 360 | { |
392 | unsigned long ret; | 361 | unsigned long ret; |
393 | 362 | ||