activemq-cpp-3.9.5
PlatformDefs.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_WINDOWS_PLATFORMDEFS_H_
19#define _DECAF_INTERNAL_UTIL_CONCURRENT_WINDOWS_PLATFORMDEFS_H_
20
21#include <decaf/util/Config.h>
22
23#if HAVE_SIGNAL_H
24#include <signal.h>
25#endif
26#if HAVE_STRING_H
27#include <string.h>
28#endif
29#if HAVE_SCHED_H
30#include <sched.h>
31#endif
32#if HAVE_SYS_TIME_H
33#include <sys/time.h>
34#endif
35#if HAVE_UNISTD_H
36#include <unistd.h>
37#endif
38#if HAVE_TIME_H
39#include <time.h>
40#endif
41#ifdef HAVE_PROCESS_H
42#include <process.h>
43#endif
44
45namespace decaf{
46namespace internal{
47namespace util{
48namespace concurrent{
49
50 struct RWLOCK {
51 HANDLE writeMutex;
52 HANDLE readEvent;
53 volatile LONG readers;
54 };
55
56 typedef void* PLATFORM_THREAD_ENTRY_ARG;
57
58 #define PLATFORM_THREAD_RETURN() return 0;
59 #define PLATFORM_THREAD_CALLBACK_TYPE unsigned
60 #define PLATFORM_MIN_STACK_SIZE 0x20000
61 #define PLATFORM_CALLING_CONV __stdcall
62
63 typedef HANDLE decaf_thread_t;
64 typedef DWORD decaf_tls_key;
65 typedef HANDLE decaf_condition_t;
66 typedef LPCRITICAL_SECTION decaf_mutex_t;
67 typedef RWLOCK* decaf_rwmutex_t;
68
69}}}}
70
71#endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_WINDOWS_PLATFORMDEFS_H_ */
Definition Atomics.h:26
pthread_cond_t * decaf_condition_t
Definition PlatformDefs.h:58
pthread_mutex_t * decaf_mutex_t
Definition PlatformDefs.h:59
pthread_t decaf_thread_t
Definition PlatformDefs.h:56
void * PLATFORM_THREAD_ENTRY_ARG
Definition PlatformDefs.h:50
pthread_key_t decaf_tls_key
Definition PlatformDefs.h:57
pthread_rwlock_t * decaf_rwmutex_t
Definition PlatformDefs.h:60
Definition ByteArrayAdapter.h:30
Definition AprPool.h:26
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25
Definition PlatformDefs.h:50
HANDLE writeMutex
Definition PlatformDefs.h:51
volatile LONG readers
Definition PlatformDefs.h:53
HANDLE readEvent
Definition PlatformDefs.h:52