OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SANDBOX_SRC_WIN2K_THREADPOOL_H_ | 5 #ifndef SANDBOX_SRC_WIN2K_THREADPOOL_H_ |
6 #define SANDBOX_SRC_WIN2K_THREADPOOL_H_ | 6 #define SANDBOX_SRC_WIN2K_THREADPOOL_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 #include <algorithm> |
8 #include <list> | 11 #include <list> |
9 #include <algorithm> | 12 #include "base/macros.h" |
10 #include "sandbox/win/src/crosscall_server.h" | 13 #include "sandbox/win/src/crosscall_server.h" |
11 | 14 |
12 namespace sandbox { | 15 namespace sandbox { |
13 | 16 |
14 // Win2kThreadPool a simple implementation of a thread provider as required | 17 // Win2kThreadPool a simple implementation of a thread provider as required |
15 // for the sandbox IPC subsystem. See sandbox\crosscall_server.h for the details | 18 // for the sandbox IPC subsystem. See sandbox\crosscall_server.h for the details |
16 // and requirements of this interface. | 19 // and requirements of this interface. |
17 // | 20 // |
18 // Implementing the thread provider as a thread pool is desirable in the case | 21 // Implementing the thread provider as a thread pool is desirable in the case |
19 // of shared memory IPC because it can generate a large number of waitable | 22 // of shared memory IPC because it can generate a large number of waitable |
(...skipping 29 matching lines...) Expand all Loading... |
49 PoolObjects pool_objects_; | 52 PoolObjects pool_objects_; |
50 // This lock protects the list of pool wait objects. | 53 // This lock protects the list of pool wait objects. |
51 CRITICAL_SECTION lock_; | 54 CRITICAL_SECTION lock_; |
52 | 55 |
53 DISALLOW_COPY_AND_ASSIGN(Win2kThreadPool); | 56 DISALLOW_COPY_AND_ASSIGN(Win2kThreadPool); |
54 }; | 57 }; |
55 | 58 |
56 } // namespace sandbox | 59 } // namespace sandbox |
57 | 60 |
58 #endif // SANDBOX_SRC_WIN2K_THREADPOOL_H_ | 61 #endif // SANDBOX_SRC_WIN2K_THREADPOOL_H_ |
OLD | NEW |