~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Analysis/Profiler/Hook/LightweightList.h

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
#pragma once
 
5
 
 
6
#include <cassert>
 
7
#include "global.h"
 
8
 
 
9
// The LightweightList itself is not in shared memory,
 
10
// but its nodes are.
 
11
// Uses a Mutex for multithreaded access.
 
12
class LightweightList
 
13
{
 
14
public:
 
15
        LightweightList(HANDLE mutex);
 
16
 
 
17
        ThreadLocalData *add();
 
18
        void remove(ThreadLocalData *item);
 
19
private:
 
20
        ThreadLocalData *lastItem;
 
21
        HANDLE mutex;
 
22
};