source: UsbWattMeter/trunk/curl-7.47.1/lib/vtls/polarssl_threadlock.h@ 164

Last change on this file since 164 was 164, checked in by coas-nagasima, 6 years ago

TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 2.0 KB
Line 
1#ifndef HEADER_CURL_POLARSSL_THREADLOCK_H
2#define HEADER_CURL_POLARSSL_THREADLOCK_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al.
11 * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
12 *
13 * This software is licensed as described in the file COPYING, which
14 * you should have received as part of this distribution. The terms
15 * are also available at https://curl.haxx.se/docs/copyright.html.
16 *
17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18 * copies of the Software, and permit persons to whom the Software is
19 * furnished to do so, under the terms of the COPYING file.
20 *
21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22 * KIND, either express or implied.
23 *
24 ***************************************************************************/
25#include "curl_setup.h"
26
27#if (defined USE_POLARSSL) || (defined USE_MBEDTLS)
28
29#if defined(USE_THREADS_POSIX)
30# define POLARSSL_MUTEX_T pthread_mutex_t
31#elif defined(USE_THREADS_WIN32)
32# define POLARSSL_MUTEX_T HANDLE
33#endif
34
35#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
36
37int Curl_polarsslthreadlock_thread_setup(void);
38int Curl_polarsslthreadlock_thread_cleanup(void);
39int Curl_polarsslthreadlock_lock_function(int n);
40int Curl_polarsslthreadlock_unlock_function(int n);
41
42#else
43
44#define Curl_polarsslthreadlock_thread_setup() 1
45#define Curl_polarsslthreadlock_thread_cleanup() 1
46#define Curl_polarsslthreadlock_lock_function(x) 1
47#define Curl_polarsslthreadlock_unlock_function(x) 1
48
49#endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */
50
51#endif /* USE_POLARSSL */
52
53#endif /* HEADER_CURL_POLARSSL_THREADLOCK_H */
Note: See TracBrowser for help on using the repository browser.