1 // =============================================================================
2 // PROJECT CHRONO - http://projectchrono.org
3 //
4 // Copyright (c) 2014 projectchrono.org
5 // All rights reserved.
6 //
7 // Use of this source code is governed by a BSD-style license that can be found
8 // in the LICENSE file at the top level of the distribution and at
9 // http://projectchrono.org/license-chrono.txt.
10 //
11 // =============================================================================
12 
13 #ifndef CHTHREADSFUNCT_H
14 #define CHTHREADSFUNCT_H
15 
16 namespace chrono {
17 
18 typedef void (*ChThreadFunc)(void* userPtr, void* lsMemory);
19 
20 typedef void* (*ChMemorySetupFunc)();
21 
22 struct ChThreadConstructionInfo {
23     ChThreadConstructionInfo(const char* uniqueName,
24                              ChThreadFunc userThreadFunc,
25                              ChMemorySetupFunc lsMemoryFunc,
26                              int numThreads = 1,
27                              int threadStackSize = 65535)
m_uniqueNameChThreadConstructionInfo28         : m_uniqueName(uniqueName),
29           m_userThreadFunc(userThreadFunc),
30           m_lsMemoryFunc(lsMemoryFunc),
31           m_numThreads(numThreads),
32           m_threadStackSize(threadStackSize) {}
33 
34     const char* m_uniqueName;
35     ChThreadFunc m_userThreadFunc;
36     ChMemorySetupFunc m_lsMemoryFunc;
37     int m_numThreads;
38     int m_threadStackSize;
39 };
40 
41 }  // end namespace chrono
42 
43 #endif
44