summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/common/ResultBuffer.h
blob: c59d421e2d4824823d27f981befed42bf70b11c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

//#include <stdio.h>
//#include <iostream>
//#include <assert.h>
#ifndef _RESULT_BUFFER_H_
#define _RESULT_BUFFER_H_

#include <palsuite.h>

struct ResultData
{
	int value;
	int size;
//	ResultData* NextResult;
};

 class ResultBuffer
{
		//  Declare a pointer to a memory buffer to store the logged results
		char* buffer;
		// Declare an object to store the maximum Thread count
		int	MaxThreadCount;
		// Declare and internal data object to store the calculated offset between adjacent threads data sets
		int	ThreadOffset;

		// Declare a linked list object to store the parameter values
public:

	// Declare a constructor for the single process case
	ResultBuffer(int ThreadCount, int ThreadLogSize);
	// Declare a method to log data for the single process instance
	int LogResult(int Thread, char* Data);

    char* getResultBuffer(int threadId);
};

#include "resultbuffer.cpp"
#endif // _RESULT_BUFFER_H_