* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MTASKER_HH
-#define MTASKER_HH
+#pragma once
#include <stdint.h>
#include <queue>
#include <vector>
typedef std::map<int, ThreadInfo> mthreads_t;
mthreads_t d_threads;
+ size_t d_stacksize;
+ size_t d_threadsCount;
int d_tid;
int d_maxtid;
- size_t d_stacksize;
EventVal d_waitval;
enum waitstatusenum {Error=-1,TimeOut=0,Answer} d_waitstatus;
This limit applies solely to the stack, the heap is not limited in any way. If threads need to allocate a lot of data,
the use of new/delete is suggested.
*/
- MTasker(size_t stacksize=16*8192) : d_tid(0), d_maxtid(0), d_stacksize(stacksize), d_waitstatus(Error)
+ MTasker(size_t stacksize=16*8192) : d_stacksize(stacksize), d_threadsCount(0), d_tid(0), d_maxtid(0), d_waitstatus(Error)
{
initMainStackBounds();
EventKey d_eventkey; // for waitEvent, contains exact key it was awoken for
};
#include "mtasker.cc"
-
-#endif // MTASKER_HH
-