SLikeNet
0.1.3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
thread.h
Go to the documentation of this file.
1
/*
2
* Original work: Copyright (c) 2014, Oculus VR, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
7
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
8
*
9
*
10
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
11
*
12
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
13
* license found in the license.txt file in the root directory of this source tree.
14
*/
15
16
#ifndef __RAK_THREAD_H
17
#define __RAK_THREAD_H
18
19
#if defined(_WIN32_WCE)
20
#include "
WindowsIncludes.h
"
21
#endif
22
23
24
25
26
27
#include "
Export.h
"
28
29
30
31
32
33
34
#if defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
35
#include "../DependentExtensions/WinPhone8/ThreadEmulation.h"
36
using namespace
ThreadEmulation;
37
#endif
38
39
namespace
SLNet
40
{
42
#if defined(_WIN32_WCE) || defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
43
#define RAK_THREAD_DECLARATION(functionName) DWORD WINAPI functionName(LPVOID arguments)
44
45
46
#elif defined(_WIN32)
47
#define RAK_THREAD_DECLARATION(functionName) unsigned __stdcall functionName( void* arguments )
48
49
50
#else
51
#define RAK_THREAD_DECLARATION(functionName) void* functionName( void* arguments )
52
#endif
53
54
class
RAK_DLL_EXPORT
RakThread
55
{
56
public
:
57
58
59
60
66
67
/*
68
nice value Win32 Priority
69
-20 to -16 THREAD_PRIORITY_HIGHEST
70
-15 to -6 THREAD_PRIORITY_ABOVE_NORMAL
71
-5 to +4 THREAD_PRIORITY_NORMAL
72
+5 to +14 THREAD_PRIORITY_BELOW_NORMAL
73
+15 to +19 THREAD_PRIORITY_LOWEST
74
*/
75
#if defined(_WIN32_WCE) || defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
76
static
int
Create( LPTHREAD_START_ROUTINE start_address,
void
*arglist,
int
priority=0);
77
78
79
#elif defined(_WIN32)
80
static
int
Create(
unsigned
__stdcall start_address(
void
* ),
void
*arglist,
int
priority=0);
81
82
83
84
#else
85
static
int
Create(
void
* start_address(
void
* ),
void
*arglist,
int
priority=0);
86
#endif
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
};
108
109
}
110
111
#endif
Source
include
slikenet
thread.h
Generated on Wed Aug 14 2019 22:09:46 for SLikeNet by
1.8.2