| OLD | NEW |
| 1 //===- subzero/src/IceThreading.h - Threading functions ---------*- C++ -*-===// | 1 //===- subzero/src/IceThreading.h - Threading functions ---------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file declares threading-related functions. | 10 // This file declares threading-related functions. |
| 11 // | 11 // |
| 12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
| 13 | 13 |
| 14 #ifndef SUBZERO_SRC_ICETHREADING_H | 14 #ifndef SUBZERO_SRC_ICETHREADING_H |
| 15 #define SUBZERO_SRC_ICETHREADING_H | 15 #define SUBZERO_SRC_ICETHREADING_H |
| 16 | 16 |
| 17 #include "IceDefs.h" |
| 18 |
| 17 #include <condition_variable> | 19 #include <condition_variable> |
| 18 #include <mutex> | 20 #include <mutex> |
| 19 | 21 |
| 20 #include "IceDefs.h" | |
| 21 | |
| 22 namespace Ice { | 22 namespace Ice { |
| 23 | 23 |
| 24 // BoundedProducerConsumerQueue is a work queue that allows multiple | 24 // BoundedProducerConsumerQueue is a work queue that allows multiple |
| 25 // producers and multiple consumers. A producer adds entries using | 25 // producers and multiple consumers. A producer adds entries using |
| 26 // blockingPush(), and may block if the queue is "full". A producer | 26 // blockingPush(), and may block if the queue is "full". A producer |
| 27 // uses notifyEnd() to indicate that no more entries will be added. A | 27 // uses notifyEnd() to indicate that no more entries will be added. A |
| 28 // consumer removes an item using blockingPop(), which will return | 28 // consumer removes an item using blockingPop(), which will return |
| 29 // nullptr if notifyEnd() has been called and the queue is empty (it | 29 // nullptr if notifyEnd() has been called and the queue is empty (it |
| 30 // never returns nullptr if the queue contained any items). | 30 // never returns nullptr if the queue contained any items). |
| 31 // | 31 // |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 const uint32_t Sequence; | 198 const uint32_t Sequence; |
| 199 const ItemKind Kind; | 199 const ItemKind Kind; |
| 200 std::unique_ptr<VariableDeclarationList> GlobalInits; | 200 std::unique_ptr<VariableDeclarationList> GlobalInits; |
| 201 std::unique_ptr<Assembler> Function; | 201 std::unique_ptr<Assembler> Function; |
| 202 std::unique_ptr<Cfg> RawFunc; | 202 std::unique_ptr<Cfg> RawFunc; |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 } // end of namespace Ice | 205 } // end of namespace Ice |
| 206 | 206 |
| 207 #endif // SUBZERO_SRC_ICETHREADING_H | 207 #endif // SUBZERO_SRC_ICETHREADING_H |
| OLD | NEW |